Skip to content
New issue

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

Document CSP headers requirements #672

Closed
paolodamico opened this issue Nov 16, 2020 · 5 comments
Closed

Document CSP headers requirements #672

paolodamico opened this issue Nov 16, 2020 · 5 comments

Comments

@paolodamico
Copy link
Contributor

We received some customer feedback that the toolbar and session recording features didn't work with certain CSP [policies], here are details on the feedback:

From what I can tell, connect-src is required for basic operation, and script-src for other features.

I think this can be very well document in our website

@romansergey
Copy link

Sorry for a little issue hijacking here, but could you please clarify the following to a prospective user:

Would PostHog (esp. session recording) work fine without having to add unsafe-eval and unsafe-inline in script-src?

@paolodamico
Copy link
Contributor Author

Hey @romansergey I believe so, but maybe @macobo has better context on this?

@macobo
Copy link
Contributor

macobo commented Jan 28, 2021

I don't (yet), sorry. Hoping to take a look at this soon.

Do we have any sample sites we know session recording/posthog.js doesn't work on because of this?

@zifeo
Copy link

zifeo commented Jul 9, 2022

@macobo Can you give an update on the official way to handle CSP with PostHog please?

@rcmarron
Copy link
Contributor

Hey @zifeo, I just added a note about how to get CSP to work with recordings in the recording documentation. Adding the https://app.posthog.com domain to your url list in the directive should be enough to get it working.

I'm going to close this issue, but let me know if you're having troubles getting it to work, and we can figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants