Description
Bug report
Didn't handle preflight request correctly, if browser send a CORS non simple request to get a static resource.
Actual Behavior
Occur a CORS error.
The specific info:
Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
Expected Behavior
Request successful
How Do We Reproduce?
- type
npx ll-create create react-js bug-reproduce
command in terminal - cd bug-reproduce
- yarn && yarn start
- open google.com in browser, type
fetch("http://localhost:{port}/",{headers:{"another-header":"1"}})
in devtool
Please paste the results of npx webpack-cli info
here, and mention other relevant information
System:
- OS: macOS 11.5.2
- CPU: (8) arm64 Apple M1
- Memory: 131.83 MB / 8.00 GB
Binaries:
- Node: 16.13.1 - /usr/local/bin/node
- Yarn: 1.22.15 - /usr/local/bin/yarn
- npm: 8.1.2 - /usr/local/bin/npm
Browsers:
- Chrome: 97.0.4692.71
- Safari: 14.1.2
Other relevant information
- webpack version: "5.66.0"
- webpack-dev-sever version:"4.7.3"
Metadata
Metadata
Assignees
Labels
No labels