@@ -153,7 +153,7 @@ const internalNginx = {
153
153
const locationRendering = async ( ) => {
154
154
for ( let i = 0 ; i < host . locations . length ; i ++ ) {
155
155
let locationCopy = Object . assign ( { } , { access_list_id : host . access_list_id } , { certificate_id : host . certificate_id } ,
156
- { ssl_forced : host . ssl_forced } , { caching_enabled : host . caching_enabled } , { block_exploits : host . block_exploits } ,
156
+ { ssl_forced : host . ssl_forced } , { caching_enabled : host . caching_enabled } , { block_exploits : host . block_exploits } , { drop_unauthorized : host . drop_unauthorized } ,
157
157
{ allow_websocket_upgrade : host . allow_websocket_upgrade } , { http2_support : host . http2_support } ,
158
158
{ hsts_enabled : host . hsts_enabled } , { hsts_subdomains : host . hsts_subdomains } , { access_list : host . access_list } ,
159
159
{ certificate : host . certificate } , host . locations [ i ] ) ;
@@ -205,6 +205,12 @@ const internalNginx = {
205
205
let origLocations ;
206
206
207
207
// Manipulate the data a bit before sending it to the template
208
+ if ( typeof host . drop_unauthorized === 'undefined' ) {
209
+ // Only proxy-hosts can have drop_unauthorized, but all hosts share
210
+ // the templates.
211
+ host . drop_unauthorized = 0 ;
212
+ }
213
+
208
214
if ( nice_host_type !== 'default' ) {
209
215
host . use_default_location = true ;
210
216
if ( typeof host . advanced_config !== 'undefined' && host . advanced_config ) {
0 commit comments