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

Netlify Adapter _redirects overwriting blanket redirect to render function #4722

Closed
saturnonearth opened this issue Apr 24, 2022 · 0 comments · Fixed by #4890
Closed

Netlify Adapter _redirects overwriting blanket redirect to render function #4722

saturnonearth opened this issue Apr 24, 2022 · 0 comments · Fixed by #4890
Labels
bug Something isn't working
Milestone

Comments

@saturnonearth
Copy link

Describe the bug

Bug was introduced in recent Edge Function updates (even when not using the feature).

I had a _redirect file that had one line,

http://example.com/* https://example.com/:splat 301!

This was to fix that the fact that HTTP was not correctly being redirected to HTTPS by Netlify on first load on a fresh cache.

When building with new @next.55, my _redirect file is being copied over, but it is not including the necessary * /.netlify/functions/render 200, which seems to be needed to render the entire app. It seems to work correctly if you have no pre-existing _redirect file.

Reproduction

Add _redirect file to Static folder, and cry as your app is put into the magicians hat.

Logs

No response

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 19.58 GB / 31.92 GB
  Binaries:
    Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (100.0.1185.50)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    @sveltejs/adapter-netlify: ^1.0.0-next.55 => 1.0.0-next.55
    @sveltejs/kit: 1.0.0-next.320 => 1.0.0-next.320
    svelte: 3.47.0 => 3.47.0

Severity

serious, but I can work around it

Additional Information

No response

@Rich-Harris Rich-Harris added the bug Something isn't working label Apr 24, 2022
@Rich-Harris Rich-Harris added this to the 1.0 milestone Apr 24, 2022
Rich-Harris added a commit that referenced this issue May 12, 2022
 (#4890)

* append function redirects after copying existing redirects - fixes #4722

* Update .changeset/ninety-books-jam.md

* add explanatory comment
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

Successfully merging a pull request may close this issue.

2 participants