Skip to content

Commit ac1c34f

Browse files
author
Aurelien DEROUINEAU
committed
Code refactoring: Rename set_forwarded_host() to set_forwarded_headers() as all X-Forwarded-* headers are set there.
1 parent b683d9a commit ac1c34f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rack_reverse_proxy/roundtrip.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def host_header
8989
"#{uri.host}:#{uri.port}"
9090
end
9191

92-
def set_forwarded_host
92+
def set_forwarded_headers
9393
return unless options[:x_forwarded_host]
9494
target_request_headers["X-Forwarded-Host"] = source_request.host
9595
target_request_headers["X-Forwarded-Port"] = source_request.port.to_s
@@ -178,7 +178,7 @@ def need_replace_location?
178178

179179
def setup_request
180180
preserve_host
181-
set_forwarded_host
181+
set_forwarded_headers
182182
initialize_http_header
183183
set_basic_auth
184184
setup_body

0 commit comments

Comments
 (0)