Skip to content

Commit

Permalink
feat: Update Content Security Policy for PostHog (#3331)
Browse files Browse the repository at this point in the history
The `next.config.js` file has been modified to update the Content
Security Policy (CSP) for PostHog. The CSP now allows requests to any
subdomain of `posthog.com` for both `script-src` and `frame-src`. This
change ensures that the frontend application can properly communicate
with PostHog services.

Co-authored-by: Stan Girard <[email protected]>

# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
StanGirard authored Oct 7, 2024
1 parent b9799c2 commit 7cd11d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ const ContentSecurityPolicy = {
"https://*.vercel.app",
"https://www.google-analytics.com/",
"https://js.stripe.com",
"https://us.posthog.com",
"https://*.posthog.com",
],
"frame-src": ["https://js.stripe.com", "https://us.posthog.com"],
"frame-src": ["https://js.stripe.com", "https://*.posthog.com"],
"frame-ancestors": ["'none'"],
"style-src": [
"'unsafe-inline'",
Expand Down

0 comments on commit 7cd11d3

Please sign in to comment.