allow resource redirect if host is same

This commit is contained in:
Milo Schwartz 2025-01-10 00:13:51 -05:00
parent fcc6cad6d7
commit c3d19454f7
No known key found for this signature in database
2 changed files with 11 additions and 12 deletions

View file

@ -101,8 +101,7 @@ export async function verifyResourceSession(
return allowed(res);
}
// const redirectUrl = `${config.getRawConfig().app.dashboard_url}/auth/resource/${encodeURIComponent(resource.resourceId)}?redirect=${encodeURIComponent(originalRequestURL)}`;
const redirectUrl = `${config.getRawConfig().app.dashboard_url}/auth/resource/${encodeURIComponent(resource.resourceId)}`;
const redirectUrl = `${config.getRawConfig().app.dashboard_url}/auth/resource/${encodeURIComponent(resource.resourceId)}?redirect=${encodeURIComponent(originalRequestURL)}`;
if (!sessions) {
return notAllowed(res);