Skip to content

Commit

Permalink
Config scp update
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriibudko committed Apr 18, 2024
1 parent 7a1b892 commit 2bffe5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions csp.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ const config = {
'*.doubleclick.net',
'*.googletagmanager.com',
],
'script-src-elem': [
SELF,
'*.google-analytics.com',
'*.doubleclick.net',
'*.googletagmanager.com',
],
// TODO: Move 'unsafe-inline' to dev when the Next.js' bug is resolved
// See more: https://github.com/vercel/next.js/issues/17445
'style-src': [SELF, "'unsafe-inline'"],
Expand Down Expand Up @@ -39,6 +45,7 @@ const config = {
if (process.env.NODE_ENV !== 'production') {
// Allow hot module replacement using inlined scripts and styles
config['script-src'].push("'unsafe-inline'", "'unsafe-eval'")
config['script-src-elem'].push("'unsafe-inline'", "'unsafe-eval'")

// Allow connection to the local hosts in development:
// - local API is running on a different port
Expand Down

0 comments on commit 2bffe5c

Please sign in to comment.