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

feat: Adds option for nonce support #1630

Merged
merged 1 commit into from
Dec 27, 2024
Merged

Conversation

benjackwhite
Copy link
Collaborator

Changes

Solves https://posthog.com/questions/how-to-set-nonce-for-recorder-and-surveys-scripts

Adds a new option for modifying scripts before external loading, in this case for adding a nonce

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

@benjackwhite benjackwhite requested a review from a team December 25, 2024 18:47
Copy link

vercel bot commented Dec 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Dec 25, 2024 6:49pm

@benjackwhite benjackwhite added the bump patch Bump patch version when this PR gets merged label Dec 25, 2024
Copy link

Size Change: +978 B (+0.03%)

Total Size: 3.22 MB

Filename Size Change
dist/array.full.js 365 kB +163 B (+0.04%)
dist/array.js 179 kB +163 B (+0.09%)
dist/external-scripts-loader.js 2.64 kB +163 B (+6.59%) 🔍
dist/main.js 180 kB +163 B (+0.09%)
dist/module.full.js 365 kB +163 B (+0.04%)
dist/module.js 179 kB +163 B (+0.09%)
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 206 kB
dist/array.full.es5.js 262 kB
dist/array.full.no-external.js 364 kB
dist/array.no-external.js 178 kB
dist/customizations.full.js 12.6 kB
dist/dead-clicks-autocapture.js 14.4 kB
dist/exception-autocapture.js 9.48 kB
dist/module.full.no-external.js 364 kB
dist/module.no-external.js 178 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 57.6 kB
dist/surveys.js 63.3 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@benjackwhite benjackwhite merged commit c87d44e into main Dec 27, 2024
32 checks passed
@benjackwhite benjackwhite deleted the feat/allow-nonce-config branch December 27, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants