mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Set a fallback SERVER_NAME and SERVER_PORT
This commit is contained in:
parent
6d0abe5fd7
commit
92a4a713c9
2 changed files with 4 additions and 0 deletions
|
@ -86,6 +86,7 @@ module Puma
|
|||
SERVER_PORT = "SERVER_PORT".freeze
|
||||
HTTP_HOST = "HTTP_HOST".freeze
|
||||
PORT_80 = "80".freeze
|
||||
LOCALHOST = "localhost".freeze
|
||||
|
||||
SERVER_PROTOCOL = "SERVER_PROTOCOL".freeze
|
||||
HTTP_11 = "HTTP/1.1".freeze
|
||||
|
|
|
@ -356,6 +356,9 @@ module Puma
|
|||
env[SERVER_NAME] = host
|
||||
env[SERVER_PORT] = PORT_80
|
||||
end
|
||||
else
|
||||
env[SERVER_NAME] = LOCALHOST
|
||||
env[SERVER_PORT] = PORT_80
|
||||
end
|
||||
|
||||
unless env[REQUEST_PATH]
|
||||
|
|
Loading…
Reference in a new issue