diff --git a/backend/templates/_location.conf b/backend/templates/_location.conf index 5a7a6abe..fa2606c7 100644 --- a/backend/templates/_location.conf +++ b/backend/templates/_location.conf @@ -1,9 +1,4 @@ location {{ path }} { - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Scheme $scheme; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Real-IP $remote_addr; proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }}; {% if access_list_id > 0 %} diff --git a/frontend/js/models/proxy-host-location.js b/frontend/js/models/proxy-host-location.js index 2a35059f..31a32260 100644 --- a/frontend/js/models/proxy-host-location.js +++ b/frontend/js/models/proxy-host-location.js @@ -7,7 +7,11 @@ const model = Backbone.Model.extend({ return { opened: false, path: '', - advanced_config: '', + advanced_config: 'proxy_set_header Host $host;\n' + + 'proxy_set_header X-Forwarded-Scheme $scheme;\n' + + 'proxy_set_header X-Forwarded-Proto $scheme;\n' + + 'proxy_set_header X-Forwarded-For $remote_addr;\n' + + 'proxy_set_header X-Real-IP $remote_addr;', forward_scheme: 'http', forward_host: '', forward_port: '80'