Class: Jets::Shim::Adapter::Alb
- Defined in:
- lib/jets/shim/adapter/alb.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Apigw
Methods inherited from Web
#base_env, #body, #content_length, #handle, #headers, #headers_env, #host, #http_cookie, #https, #remote_addr, #request_uri, #shim_host, #special_headers, #to_rack_env, #translate_response
Methods inherited from Base
Methods included from Util::Logging
Constructor Details
This class inherits a constructor from Jets::Shim::Adapter::Base
Instance Method Details
#env ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/jets/shim/adapter/alb.rb', line 3 def env super.merge( "HTTP_PORT" => headers["x-forwarded-port"], "SERVER_PORT" => headers["x-forwarded-port"], "SERVER_PROTOCOL" => event.dig("requestContext", "protocol") || "HTTP/1.1" ) end |
#handle? ⇒ Boolean
11 12 13 14 |
# File 'lib/jets/shim/adapter/alb.rb', line 11 def handle? host =~ /elb\.amazonaws\.com/ || event.dig("requestContext", "elb") end |