browserify / wzrd.in

browserify as a service.
http://wzrd.in
MIT License
636 stars 96 forks source link

CORS headers missing for 404'd routes #167

Open robbiemu opened 7 years ago

robbiemu commented 7 years ago

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

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

I'm getting:

(index):1 XMLHttpRequest cannot load https://wzrd.in/standalone/react-redux@latest.js. 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
jfhbrook commented 7 years ago

Try removing the .js

jfhbrook commented 7 years ago

all good!

jfhbrook commented 7 years ago

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