Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "Access-Control-Allow-Origin" on options requests when using 5.4.14 #19340

Closed
7 tasks done
tommypepsi opened this issue Feb 2, 2025 · 1 comment
Closed
7 tasks done

Comments

@tommypepsi
Copy link

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

@sapphi-red
Copy link
Member

This is an expected breaking change due to security fixes. See GHSA-vg6x-rcgg-rjx6 for more details.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants