Class: Nginx::ActionCableLocation
- Defined in:
- lib/shared_infrastructure/nginx/location.rb
Instance Method Summary collapse
-
#initialize(domain_name, location = "/cable") ⇒ ActionCableLocation
constructor
A new instance of ActionCableLocation.
- #to_s(level = 0) ⇒ Object
Constructor Details
#initialize(domain_name, location = "/cable") ⇒ ActionCableLocation
Returns a new instance of ActionCableLocation.
54 55 56 57 |
# File 'lib/shared_infrastructure/nginx/location.rb', line 54 def initialize(domain_name, location = "/cable") super(location) @domain_name = domain_name end |
Instance Method Details
#to_s(level = 0) ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/shared_infrastructure/nginx/location.rb', line 59 def to_s(level = 0) Lines.new("location #{location} {", " proxy_pass http://#{domain_name};", " proxy_http_version 1.1;", " proxy_set_header Upgrade $http_upgrade;", " proxy_set_header Connection \"upgrade\";", "}").format(level) end |