CORS Requests failing from v0.41.0 onwards
See original GitHub issueNWJS Version : 0.41.0 and later Operating System : Windows 10 64bit
I tried updating a project I haven’t worked on in a while to the latest nwjs version. However, requests to my local dev server using window.fetch
fail with the following errors visible in the console:
Access to fetch at ‘https://localhost:8080/some/url/’ from origin ‘http://localhost:9090’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: 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.
:8080/some/url/:1 Failed to load resource: net::ERR_FAILED
The maximum version I can use with the requests still working is 0.40.2, with 0.41.0 up to even 0.41.3 it will result in these errors. Did I breaking changes?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top GitHub Comments
Thanks for the sample. It works in the latest 0.43.0. Looks like it got fixed in that version. Closing for now.
@rogerwang I just stumbled upon this problem.
Here’s a reproduction setup with both 0.40.1 and 0.41.0: https://github.com/WesSouza/nwjs-7182-cors-sample
Let me know if this is clear enough and helpful.