Merge branch 'csp-issue' into staging

pull/1/head
ansuz 5 years ago
commit aace3c006c

@ -43,6 +43,7 @@ if (process.env.PACKAGE) {
} }
config.httpUnsafeOrigin = config.httpUnsafeOrigin.trim(); config.httpUnsafeOrigin = config.httpUnsafeOrigin.trim();
config.httpSafeOrigin = config.httpSafeOrigin.trim().replace(/\/$/, '');
// fall back to listening on a local address // fall back to listening on a local address
// if httpAddress is not a string // if httpAddress is not a string
@ -129,7 +130,7 @@ var setHeaders = (function () {
/^\/common\/onlyoffice\/.*\/index\.html.*/, /^\/common\/onlyoffice\/.*\/index\.html.*/,
/^\/(sheet|ooslide|oodoc)\/inner\.html.*/, /^\/(sheet|ooslide|oodoc)\/inner\.html.*/,
].some((regex) => { ].some((regex) => {
return regex.test(req.url) return regex.test(req.url);
}) ? padHeaders : headers; }) ? padHeaders : headers;
for (let header in h) { res.setHeader(header, h[header]); } for (let header in h) { res.setHeader(header, h[header]); }
}; };

Loading…
Cancel
Save