Sha256: 97ad3cbb3444a8eb3148c3dc1f28c5468808a153045c08492ad092c0dc4f5391

Contents?: true

Size: 339 Bytes

Versions: 18

Compression:

Stored size: 339 Bytes

Contents

module Jets::CommonMethods
  # Add API Gateway Stage Name
  def add_stage_name(url)
    if request.host.include?("amazonaws.com") &&
            url.starts_with?('/') &&
            !url.starts_with?('http')
      stage_name = Jets::Resource::ApiGateway::Deployment.stage_name
      url = "/#{stage_name}#{url}"
    end

    url
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
jets-0.9.1 lib/jets/rails_overrides/common_methods.rb
jets-0.9.0 lib/jets/rails_overrides/common_methods.rb
jets-0.8.18 lib/jets/rails_overrides/common_methods.rb
jets-0.8.17 lib/jets/rails_overrides/common_methods.rb
jets-0.8.15 lib/jets/rails_overrides/common_methods.rb
jets-0.8.14 lib/jets/rails_overrides/common_methods.rb
jets-0.8.13 lib/jets/rails_overrides/common_methods.rb
jets-0.8.12 lib/jets/rails_overrides/common_methods.rb
jets-0.8.11 lib/jets/rails_overrides/common_methods.rb
jets-0.8.10 lib/jets/rails_overrides/common_methods.rb
jets-0.8.9 lib/jets/rails_overrides/common_methods.rb
jets-0.8.8 lib/jets/rails_overrides/common_methods.rb
jets-0.8.6 lib/jets/rails_overrides/common_methods.rb
jets-0.8.5 lib/jets/rails_overrides/common_methods.rb
jets-0.8.4 lib/jets/rails_overrides/common_methods.rb
jets-0.8.3 lib/jets/rails_overrides/common_methods.rb
jets-0.8.2 lib/jets/rails_overrides/common_methods.rb
jets-0.8.1 lib/jets/rails_overrides/common_methods.rb