This commit is contained in:
Edoardo Viviani 2023-03-19 02:50:15 -07:00 committed by GitHub
commit 9982d33ba0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -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 }};
{% include "_access.conf" %}

View file

@ -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'