rsms / scripter

The Scripter Figma plugin
https://figma.com/c/plugin/757836922707087381/
MIT License
190 stars 22 forks source link

Cloudflare seems to be blocking .ts files #20

Closed rzuppur closed 1 year ago

rzuppur commented 1 year ago

Scripter is broken for me, loading spinner never stops and UI is frozen. Console has this and more similar errors for different .ts files

scripter.rsms.me/:1 Access to fetch at 'https://www.cloudflare-terms-of-service-abuse.com/stream.mp4' (redirected from 'https://scripter.rsms.me/lib.dom.d.ts?v=+EviNZmp2POY3vxI1MwvwLsktEk') from origin 'https://scripter.rsms.me' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I'm guessing since ts is also a video transport stream file extension, some dumb filter at Cloudflare thinks you are serving video and blocks the request?

6220119 commented 1 year ago

The issue with CloudFlare seems to be resolved already. But a new one shows up: Invalid Certificate, so the plugin cannot be started. At the moment, I have to work around it by disabling security check.

image
rsms commented 1 year ago

I disabled Cloudflare caching. They had severe performance issues. The SSL issue was a bug on GitHub’s end and should be fixed now.

rsms commented 1 year ago

Weeeellll I had to re-enable CF since GH has some bug re SSL & DNS. See #21

rsms commented 1 year ago

I'm imagining a fix being to rename all .ts files that are loaded at runtime to .ts.txt and making sure they are properly recognized as TypeScript by Monaco in Scripter.

rsms commented 1 year ago

I was able to fix the GitHub SSL issues and now the .ts files seem to be loading again. Please confirm that/if this solved your issues!

Screen Shot 2023-04-05 at 16 32 37
rzuppur commented 1 year ago

Seems to be working, thanks! Good to know that this plugin is still being maintained

rsms commented 1 year ago

:•)