Skip to content

Commit

Permalink
feat: adding manifest-src to csp
Browse files Browse the repository at this point in the history
  • Loading branch information
Markkos89 committed Sep 3, 2023
1 parent 4fba385 commit 5ffbbfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/utils/src/csp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const cspDev = {
"img-src": ["'self'"],
"script-src": ["'self'", "'unsafe-eval'", "'unsafe-inline'"],
"style-src": ["'self'", "'unsafe-inline'"],
"manifest-src": ["'self'"],
} satisfies CspDirectives;

const nextThemesHash = "'sha256-eMuh8xiwcX72rRYNAGENurQBAcH7kLlAUQcoOri3BIo='";
Expand All @@ -80,6 +81,7 @@ const cspProd = {
"img-src": ["'self'"],
"script-src": ["'self'", nextThemesHash],
"style-src": ["'self'", "'unsafe-inline'"],
"manifest-src": ["'self'"],
} satisfies CspDirectives;

export const getCspContent = (inlineScript: string): string => {
Expand Down

0 comments on commit 5ffbbfa

Please sign in to comment.