Open exequiel09 opened 2 years ago
Partytown moves to QwikDev organization, this is a new beginning for the project. So it's time to clarify the status and clean up the current state a bit. This issue was automatically marked as deprecated and closed because it was not detected recent activity for 8 months, date of latest version. If this issue is still relevant, feel free to comment below and the maintainers will reopen it. Thank you for your contributions.
We still need to have trusted types support :)
Thanks @exequiel09 for your help
Describe the bug I recently tried enabling CSP Trusted Types with a site that uses partytown and it throws errors about
TrustedScript
assignment on these specific fileshttps://github.com/BuilderIO/partytown/blob/0a06db0e2034188a6330d51eb6ab06cce90ecb6d/src/lib/web-worker/worker-exec.ts#L121
https://github.com/BuilderIO/partytown/blob/0a06db0e2034188a6330d51eb6ab06cce90ecb6d/src/lib/web-worker/init-web-worker.ts#L29
I do think to fix this, partytown should ship their own Trusted Type policy and let consumers add the policy via the
trusted-types
CSP directive. I'm not a security expert so I'll leave the implementation of custom Trusted Type policy to the ones who can 😅To Reproduce Steps to reproduce the behavior:
Reproduction link Please include a link to a Stackblitz or Codesandbox reproducing the issue. We will need to see the issue reproduced with hand-written code - we can't debug giant minified third party scripts directly. If you do not include a clean and simple reproduction of your issue, we won't be able to look into it until you do.
Expected behavior It should not complain when running a site with Trusted Types enabled
Partytown version 0.6.4