wzrd.in icon indicating copy to clipboard operation
wzrd.in copied to clipboard

CORS headers missing for 404'd routes

Open robbiemu opened this issue 8 years ago • 3 comments

editor's note: CORS headers should still happen on 404'd resources...

edit: please close this issue. I was calling https://wzrd.in/standalone/[email protected] instead of https://wzrd.in/standalone/react-redux@latest. My apologies.

I'm getting:

(index):1 XMLHttpRequest cannot load https://wzrd.in/standalone/[email protected]. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://robbiemu.github.io' is therefore not allowed access. The response had HTTP status code 502.

which is weird because when I load the url directly I see a cors response header in the network tab:

Access-Control-Allow-Origin:*
Connection:keep-alive
Content-Length:77297
Content-Type:text/javascript
Date:Thu, 27 Apr 2017 18:39:38 GMT
Server:nginx/1.11.3
Strict-Transport-Security:max-age=31536000; includeSubDomains; preload
X-Powered-By:Express

robbiemu avatar Apr 27 '17 18:04 robbiemu

Try removing the .js

jfhbrook avatar Apr 27 '17 18:04 jfhbrook

all good!

jfhbrook avatar Apr 27 '17 18:04 jfhbrook

Reopening because I think that 404s should also have proper CORS headers.

jfhbrook avatar Apr 27 '17 18:04 jfhbrook