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.
21 22 23 24 |
# File 'lib/shared_infrastructure/nginx/location.rb', line 21 def initialize(domain_name, location = "/cable") super(location) @domain_name = domain_name end |
Instance Method Details
#to_s(level = 0) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/shared_infrastructure/nginx/location.rb', line 26 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 |