Skip to content

Commit a6980f2

Browse files
Resolve merge conflict for viewer request
2 parents 2487677 + a1920a3 commit a6980f2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docspace-viewer-request/index.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ export const handler = async (event, context, callback) => {
1111

1212
console.log("Tenant domain: %s", tenantDomain);
1313

14-
const workspaceRegex = /(\/products\/|\/addons\/|.aspx)/i;
14+
const workspaceRegex = /(\/products\/|\/addons\/|\.aspx)/i;
15+
const confirmPageRegex = /confirm\.aspx/i;
16+
const editorPageRegex = /\/Products\/Files\/DocEditor\.aspx/i;
1517

16-
if (workspaceRegex.test(request.uri))
18+
//if (workspaceRegex.test(request.uri) && !confirmPageRegex.test(request.uri))
19+
if (editorPageRegex.test(request.uri))
1720
{
1821
const newurl = `https://${tenantDomain.replace(domain_name_replace_placeholder)}${request.uri}?${request.querystring}`;
1922
console.log("redirect to: %s", newurl);
@@ -37,4 +40,4 @@ export const handler = async (event, context, callback) => {
3740
}
3841

3942
return callback(null, request);
40-
}
43+
}

0 commit comments

Comments
 (0)