We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I set up next.config.js as below aiming at allowing the regular scripts from Analytics and Adsense but getting a number of errors.
next.config.js
I tried adding some of the origins to the config, but how can one be sure to have included all origins that Google may include.
With the following code at `next.config.js:
async headers() { return [ { source: '/(.*)', headers: createSecureHeaders({ contentSecurityPolicy: { directives: { scriptSrc: [ "'self'", 'https://www.googletagmanager.com', 'https://pagead2.googlesyndication.com', 'https://partner.googleadservices.com', ], }, }, }), }, ]; },
Getting these errors:
Code above
Load scripts while keeping secure headers.
v2.1.0
v14.15.3
macOS 11.4
Add any other context about the problem here, or a screenshot if applicable.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
💩 Bug Report
A summary of the bug
I set up
next.config.js
as below aiming at allowing the regular scripts from Analytics and Adsense but getting a number of errors.I tried adding some of the origins to the config, but how can one be sure to have included all origins that Google may include.
Current behavior
With the following code at `next.config.js:
Getting these errors:
To Reproduce
Code above
Expected behavior
Load scripts while keeping secure headers.
Environment
v2.1.0
v14.15.3
macOS 11.4
Additional context
Add any other context about the problem here, or a screenshot if applicable.
The text was updated successfully, but these errors were encountered: