Skip to content

Commit

Permalink
fix(spa): allow service worker in trusted types policy (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmasberg authored Mar 13, 2024
1 parent f8a8016 commit cc641e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/spa/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ registerLocaleData(de);
},
);
},
createScriptURL: (string) => {
if (string.startsWith('blob:' + window.location.origin)) {
return string;
createScriptURL: (s) => {
if (
s === 'ngsw-worker.js' ||
s.startsWith('blob:' + window.location.origin)
) {
return s;
}
return '';
},
Expand Down

0 comments on commit cc641e9

Please sign in to comment.