adding wrapper for proxy header passing.

add a selection to the proxy editing page and passes that down into the templates.
Removed set_proxy_header from locations and moved to server directive. these will inherit down into locations if they are not defined there.
This commit is contained in:
Nick Craig
2022-03-09 10:19:51 -05:00
parent 7f2d59a4f1
commit c571599d45
9 changed files with 82 additions and 24 deletions

View File

@@ -72,7 +72,7 @@
</label>
</div>
</div>
<div class="col-sm-12 col-md-12">
<div class="col-sm-6 col-md-6">
<div class="form-group">
<label class="custom-switch">
<input type="checkbox" class="custom-switch-input" name="allow_websocket_upgrade" value="1"<%- allow_websocket_upgrade ? ' checked' : '' %>>
@@ -81,6 +81,15 @@
</label>
</div>
</div>
<div class="col-sm-6 col-md-6">
<div class="form-group">
<label class="custom-switch">
<input type="checkbox" class="custom-switch-input" name="forward_proxy_header" value="1"<%- forward_proxy_header ? ' checked' : '' %>>
<span class="custom-switch-indicator"></span>
<span class="custom-switch-description"><%- i18n('proxy-hosts', 'forward-proxy-header') %></span>
</label>
</div>
</div>
<div class="col-sm-12 col-md-12">
<div class="form-group">

View File

@@ -163,6 +163,7 @@ module.exports = Mn.View.extend({
data.block_exploits = !!data.block_exploits;
data.caching_enabled = !!data.caching_enabled;
data.allow_websocket_upgrade = !!data.allow_websocket_upgrade;
data.forward_proxy_header = !!data.forward_proxy_header;
data.http2_support = !!data.http2_support;
data.hsts_enabled = !!data.hsts_enabled;
data.hsts_subdomains = !!data.hsts_subdomains;

View File

@@ -19,6 +19,7 @@ const model = Backbone.Model.extend({
hsts_subdomains: false,
caching_enabled: false,
allow_websocket_upgrade: false,
forward_proxy_header: true,
block_exploits: false,
http2_support: false,
advanced_config: '',