Skip to content

Commit ca1ea04

Browse files
authored
Update nginx.js
1 parent f26df7d commit ca1ea04

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

backend/internal/nginx.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const internalNginx = {
137137
*/
138138
renderLocations: (host) => {
139139

140-
// logger.info('host = ' + JSON.stringify(host, null, 2));
140+
//logger.info('host = ' + JSON.stringify(host, null, 2));
141141
return new Promise((resolve, reject) => {
142142
let template;
143143

@@ -149,18 +149,18 @@ const internalNginx = {
149149
}
150150

151151
let renderer = new Liquid({
152-
root: __dirname + '/../templates/'
153-
});
152+
root: __dirname + '/../templates/'
153+
});
154154
let renderedLocations = '';
155155

156156
const locationRendering = async () => {
157157
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]);
164164

165165
if (locationCopy.forward_host.indexOf('/') > -1) {
166166
const splitted = locationCopy.forward_host.split('/');
@@ -169,7 +169,7 @@ const internalNginx = {
169169
locationCopy.forward_path = `/${splitted.join('/')}`;
170170
}
171171

172-
// logger.info('locationCopy = ' + JSON.stringify(locationCopy, null, 2));
172+
//logger.info('locationCopy = ' + JSON.stringify(locationCopy, null, 2));
173173

174174
// eslint-disable-next-line
175175
renderedLocations += await renderer.parseAndRender(template, locationCopy);
@@ -223,7 +223,7 @@ const internalNginx = {
223223
}
224224

225225
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));
227227
origLocations = [].concat(host.locations);
228228
locationsPromise = internalNginx.renderLocations(host).then((renderedLocations) => {
229229
host.locations = renderedLocations;

0 commit comments

Comments
 (0)