Skip to content

Commit

Permalink
Fix localstorage logic
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <[email protected]>
  • Loading branch information
joshuali925 committed Aug 16, 2022
1 parent 3f80cb5 commit 2128caa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const createVisualReport = async (
!ALLOWED_HOSTS.test(new URL(req.url()).hostname)
) {
if (req.isNavigationRequest() && req.redirectChain().length > 0) {
localStorageAvailable = false;
logger.error(
'Reporting does not allow redirections to outside of localhost, aborting. URL received: ' +
req.url()
Expand All @@ -127,7 +128,6 @@ export const createVisualReport = async (
'Disabled connection to non-allowlist domains: ' + req.url()
);
}
localStorageAvailable = true;
req.abort();
} else {
req.continue();
Expand Down

0 comments on commit 2128caa

Please sign in to comment.