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.
36 37 38 39 |
# File 'lib/shared_infrastructure/nginx/location.rb', line 36 def initialize(domain_name, location = "/cable") super(location) @domain_name = domain_name end |
Instance Method Details
#to_s(level = 0) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/shared_infrastructure/nginx/location.rb', line 41 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 |