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

CORS check should not apply to +page|layout.server.js #7452

Closed
Rich-Harris opened this issue Oct 31, 2022 · 1 comment
Closed

CORS check should not apply to +page|layout.server.js #7452

Rich-Harris opened this issue Oct 31, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Rich-Harris
Copy link
Member

Describe the bug

In #6550 we started simulating CORS errors for server-side fetches to avoid a discrepancy between server-side and client-side fetches.

More recently, in #7113, we added fetch to RequestEvent, meaning that you can use event.fetch in a +page.server.js or +layout.server.js. But the simulated CORS errors still apply, needlessly.

Reproduction

https://github.com/Rich-Harris/sveltekit-server-side-fetch-bug-repro

Logs

No response

System Info

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 74.27 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 107.0.5304.87
    Chrome Canary: 109.0.5388.0
    Firefox: 106.0.1
    Safari: 15.6.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.86 
    @sveltejs/kit: next => 1.0.0-next.511 
    svelte: ^3.44.0 => 3.52.0 
    vite: ^3.1.0 => 3.2.2

Severity

serious, but I can work around it

Additional Information

No response

@Rich-Harris Rich-Harris added the bug Something isn't working label Oct 31, 2022
@dummdidumm
Copy link
Member

Didn't think I'd say this to you one day, but duplicate of #7441 😜

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants