@@ -137,7 +137,7 @@ const internalNginx = {
137
137
*/
138
138
renderLocations : ( host ) => {
139
139
140
- // logger.info('host = ' + JSON.stringify(host, null, 2));
140
+ // logger.info('host = ' + JSON.stringify(host, null, 2));
141
141
return new Promise ( ( resolve , reject ) => {
142
142
let template ;
143
143
@@ -149,18 +149,18 @@ const internalNginx = {
149
149
}
150
150
151
151
let renderer = new Liquid ( {
152
- root : __dirname + '/../templates/'
153
- } ) ;
152
+ root : __dirname + '/../templates/'
153
+ } ) ;
154
154
let renderedLocations = '' ;
155
155
156
156
const locationRendering = async ( ) => {
157
157
for ( let i = 0 ; i < host . locations . length ; i ++ ) {
158
- let locationCopy = Object . assign ( { } , { access_list_id : host . access_list_id } , { certificate_id : host . certificate_id } ,
159
- { ssl_forced : host . ssl_forced } , { caching_enabled : host . caching_enabled } ,
160
- { block_exploits : host . block_exploits } , { allow_websocket_upgrade : host . allow_websocket_upgrade } ,
161
- { http2_support : host . http2_support } , { hsts_enabled : host . hsts_enabled } ,
162
- { hsts_subdomains : host . hsts_subdomains } , { access_list : host . access_list } ,
163
- { certificate : host . certificate } , host . locations [ i ] ) ;
158
+ let locationCopy = Object . assign ( { } , { access_list_id : host . access_list_id } , { certificate_id : host . certificate_id } ,
159
+ { ssl_forced : host . ssl_forced } , { caching_enabled : host . caching_enabled } ,
160
+ { block_exploits : host . block_exploits } , { allow_websocket_upgrade : host . allow_websocket_upgrade } ,
161
+ { http2_support : host . http2_support } , { hsts_enabled : host . hsts_enabled } ,
162
+ { hsts_subdomains : host . hsts_subdomains } , { access_list : host . access_list } ,
163
+ { certificate : host . certificate } , host . locations [ i ] ) ;
164
164
165
165
if ( locationCopy . forward_host . indexOf ( '/' ) > - 1 ) {
166
166
const splitted = locationCopy . forward_host . split ( '/' ) ;
@@ -169,7 +169,7 @@ const internalNginx = {
169
169
locationCopy . forward_path = `/${ splitted . join ( '/' ) } ` ;
170
170
}
171
171
172
- // logger.info('locationCopy = ' + JSON.stringify(locationCopy, null, 2));
172
+ // logger.info('locationCopy = ' + JSON.stringify(locationCopy, null, 2));
173
173
174
174
// eslint-disable-next-line
175
175
renderedLocations += await renderer . parseAndRender ( template , locationCopy ) ;
@@ -223,7 +223,7 @@ const internalNginx = {
223
223
}
224
224
225
225
if ( host . locations ) {
226
- // logger.info ('host.locations = ' + JSON.stringify(host.locations, null, 2));
226
+ // logger.info ('host.locations = ' + JSON.stringify(host.locations, null, 2));
227
227
origLocations = [ ] . concat ( host . locations ) ;
228
228
locationsPromise = internalNginx . renderLocations ( host ) . then ( ( renderedLocations ) => {
229
229
host . locations = renderedLocations ;
0 commit comments