Skip to content

Commit

Permalink
Fix localstorage logic
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <joshuali925@gmail.com>
  • Loading branch information
joshuali925 committed Aug 17, 2022
1 parent c5f3af2 commit a7818f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,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 @@ -107,7 +108,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 a7818f8

Please sign in to comment.