CORS stopped working
See original GitHub issueCORS headers for Hoodie APIs no longer get set, so cross origin requests fail.
Steps to reproduce:
git clone https://github.com/hoodiehq/hoodie-app-tracker.git
cd hoodie-app-tracker/
npm start -- --url="http://localhost:8080"
- Open http://127.0.0.1:8080/account.html in an incognito / private tab.
- Try to log in.
A message like this should appear in the console:
XMLHttpRequest cannot load http://localhost:8080/hoodie/account/api/session. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://127.0.0.1:8080’ is therefore not allowed access. The response had HTTP status code 404.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
CORS errors - HTTP - MDN Web Docs - Mozilla
If the CORS configuration isn't setup correctly, the browser console will present an error like "Cross-Origin Request Blocked: The Same Origin ...
Read more >CORS errors and how to solve them - Topcoder
Open a network tab in your console. ... In the response header look for the Access-Control-Allow-Origin header. If it does not exist then...
Read more >CORS not working anymore - Stack Overflow
When I go to the website I get "Failed to load dashboard.inofec.nl/ip: The 'Access-Control-Allow-Origin' header contains multiple values 'inofec ...
Read more >3 Ways to Fix the CORS Error — and How the Access-Control ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >A Guide to Solving Those Mystifying CORS Issues
CORS stands for Cross-Origin Resource Sharing. ... a lot of misconceptions about CORS and plenty of available 'solutions' that don't work.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gr2m Not really, I spent some time on this but didn’t find out much new. The Hoodie implementation looks got to me (but I didn’t find much documentation on the sandbox feature).
Next steps could be to look for a solution in the hapi code or to build a reduced test case. I can’t tell when I’ll find the time to do so 😕
Hey @sdvg any update on the issue? @brunopedroso just run into the same thing
For the record: a temporary workaround is to remove
sandbox: 'plugin'
from https://github.com/hoodiehq/hoodie/blob/master/server/index.js#L55