You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a Shopify POS app, requests coming from the POS causes OPTIONS preflight requests. All my requests were failing with cors errors and I couldn't find any way to add the "Access-Control-Allow-Origin" header to options request, after 2 days of debugging I downgraded vite to 5.4.13 in desperation and boom, now it works as expected 🤯
Not sure what the issue is, but something appears to have changed between 5.4.13 and 5.4.14 that removes the "Access-Control-Allow-Origin" header on options requests.
Reproduction
no url
Steps to reproduce
Not entirely sure if it's replicable with any setup, but I'm using the Shopify app template. After that I can simply use postman, use the "OPTIONS" method send a request to my URL and see that the "Access-Control-Allow-Origin" is missing from the response headers.
Downgrading to 5.4.13 doing the same I can see the "Access-Control-Allow-Origin: *" is present.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
I'm working on a Shopify POS app, requests coming from the POS causes OPTIONS preflight requests. All my requests were failing with cors errors and I couldn't find any way to add the "Access-Control-Allow-Origin" header to options request, after 2 days of debugging I downgraded vite to 5.4.13 in desperation and boom, now it works as expected 🤯
Not sure what the issue is, but something appears to have changed between 5.4.13 and 5.4.14 that removes the "Access-Control-Allow-Origin" header on options requests.
Reproduction
no url
Steps to reproduce
Not entirely sure if it's replicable with any setup, but I'm using the Shopify app template. After that I can simply use postman, use the "OPTIONS" method send a request to my URL and see that the "Access-Control-Allow-Origin" is missing from the response headers.
Downgrading to 5.4.13 doing the same I can see the "Access-Control-Allow-Origin: *" is present.
System Info
System: OS: macOS 15.2 CPU: (16) arm64 Apple M4 Max Memory: 64.93 GB / 128.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 23.6.0 - /opt/homebrew/bin/node npm: 10.9.2 - /opt/homebrew/bin/npm Browsers: Chrome: 132.0.6834.160 Safari: 18.2 npmPackages: vite: ^5.4.14 => 5.4.14
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: