Skip to content

Commit 85d3244

Browse files
committed
Fix localstorage logic
Signed-off-by: Joshua Li <[email protected]>
1 parent fd747d4 commit 85d3244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dashboards-reports/server/routes/utils/visual_report/visualReportHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export const createVisualReport = async (
9898
!ALLOWED_HOSTS.test(new URL(req.url()).hostname)
9999
) {
100100
if (req.isNavigationRequest() && req.redirectChain().length > 0) {
101+
localStorageAvailable = false;
101102
logger.error(
102103
'Reporting does not allow redirections to outside of localhost, aborting. URL received: ' +
103104
req.url()
@@ -107,7 +108,6 @@ export const createVisualReport = async (
107108
'Disabled connection to non-allowlist domains: ' + req.url()
108109
);
109110
}
110-
localStorageAvailable = true;
111111
req.abort();
112112
} else {
113113
req.continue();

0 commit comments

Comments
 (0)