Fix “Forwarded” header being used inappropriately (#41481)
This commit is contained in:
1 parent
804ed3c41a
commit
88c6c937d8
2 files changed
+4
No files matched your search
@@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rack::Request.forwarded_priority = [:x_forwarded, :forwarded]
|
||||
|
||||
unless Rails.application.config.action_dispatch.trusted_proxies.nil?
|
||||
# Rack is configured with a default collection of trusted proxies
|
||||
# If Rails has been configured to use a specific list, configure
|
||||
|
||||
Vendored
+2
@@ -128,6 +128,7 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Forwarded "";
|
||||
proxy_set_header Proxy "";
|
||||
|
||||
proxy_pass http://streaming;
|
||||
@@ -145,6 +146,7 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Forwarded "";
|
||||
proxy_set_header Proxy "";
|
||||
proxy_pass_header Server;
|
||||
|
||||
|
||||
Reference in new issue
Block a user