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
If the home page / is prerendered, invalid static requests (those matching the paths in _routes.jsonexcluded but are not found) such as /_app/abcd, incorrectly return a 200 status code and the content of the prerendered /index.html file if any.
However, if a 404.html file is found, it is returned alongside the expected 404 status code.
Reproduction
Find a Cloudflare Pages website deployed with @sveltejs/adapter-cloudflare.
Navigate to a non-existent /_app/* URL.
For example, the URL below should return a 404 but returns the prerendered home page:
When the root page is not prerendered, invalid requests to /_app/* return a blank page and a 404.
So, should the Cloudflare adapter include a /404.html by default to ensure this occurs consistently?
Or is it enough to document the importance of including a 404.html page?
The text was updated successfully, but these errors were encountered:
eltigerchino
changed the title
invalid requests to /_app/* returns unstyled root page instead of 404
invalid requests to /_app/* do not return 404
Feb 12, 2023
eltigerchino
changed the title
invalid requests to /_app/* do not return 404
invalid static requests do not return a 404
Feb 12, 2023
eltigerchino
changed the title
invalid static requests do not return a 404
invalid static requests return index.html instead of 404
Feb 12, 2023
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
If the home page
/
is prerendered, invalid static requests (those matching the paths in_routes.json
excluded
but are not found) such as/_app/abcd
, incorrectly return a200
status code and the content of the prerendered/index.html
file if any.However, if a
404.html
file is found, it is returned alongside the expected 404 status code.Reproduction
@sveltejs/adapter-cloudflare
./_app/*
URL.For example, the URL below should return a 404 but returns the prerendered home page:
https://brgh.church/_app/doesntexist
Logs
No response
System Info
Severity
annoyance
Additional Information
When the root page is not prerendered, invalid requests to
/_app/*
return a blank page and a 404.So, should the Cloudflare adapter include a
/404.html
by default to ensure this occurs consistently?Or is it enough to document the importance of including a
404.html
page?The text was updated successfully, but these errors were encountered: