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

trpc-playground@next is blocked by browser #34

Open
kaminskypavel opened this issue Dec 15, 2022 · 5 comments
Open

trpc-playground@next is blocked by browser #34

kaminskypavel opened this issue Dec 15, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@kaminskypavel
Copy link

using it with express@4.

getting errors in multiple browsers

Refused to load the script 'https://cdn.jsdelivr.net/npm/@trpc-playground/[email protected]/dist/assets/index.70ae6946.js' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
@sachinraja
Copy link
Owner

sachinraja commented Dec 18, 2022

Which browser? I can't reproduce this on Chrome on MacOS.

@sachinraja sachinraja added the bug Something isn't working label Dec 18, 2022
@kaminskypavel
Copy link
Author

kaminskypavel commented Dec 19, 2022

Tried it on brave/firefox/edge

On win 11

@MatsDK
Copy link
Collaborator

MatsDK commented Dec 19, 2022

For me this is working on brave (windows 11). Maybe try installing trpc-playground@latest.

@ollyde
Copy link

ollyde commented Jul 3, 2023

I've had the same issue for around a year now, I have to disable cors using a plugin for Firefox.

It would seem that the CDN does not accept localhost as pre-flight.

I'm guessing the maintainer uses a specific port for TRPC playground?

A better alternative instead of using a risky CDN is to just host the files inside the npm package. Better version control then @sachinraja

Screenshot 2023-07-03 at 17 40 26

@ollyde
Copy link

ollyde commented Jul 4, 2023

For an alternative we are using https://github.com/iway1/trpc-panel which is npm hosted internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants