-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
HTTP 403 response with valid route component called tests.svelte
in dev
#4353
Comments
tests.svelte
does not work in dev (but works fine for a build)tests.svelte
in dev
tests.svelte
in devtests.svelte
in dev
Does this work for you with the latest Vite 2.9 beta? Dominik just got a change in that might fix this: vitejs/vite#6518 |
@benmccann thanks, bug is present in vite 2.9.0-beta.3 |
The issue is not about In dev mode, the request flow is as below: serveStaticMiddleware will treat /xxxx as local file/folder, so if same file/folder exist and not allowed to access, the middleware will return a error. serveStaticMiddleware will call the function ensureServingAccess.
|
@aolose got it, thanks for the detailed explanation, helps a ton. @benmccann when you select playwright tests in the kit cli, you end up with a Potential solution could be to move |
I filed an issue upstream for this: vitejs/vite#7363 |
@benmccann hadn't thought of that environment var leak scenario. Thanks for the fast response, I think this is good to close 🚀 |
I will leave this open since the issue is still present |
@benmccann @Rich-Harris I am using a sveltekit component library. |
@glitchedgitz you're not seeing the same issue I filed. Items inside the |
Hi @qbunt I am using that as a component library. So content in static folder is not moving to /package after running I already check vite rules to allow it in vite.config.js |
Encountered this for the first time today after making a |
Describe the bug
With a route component called
tests.svelte
, I'm seeing the following warning in dev only.When I run this in Stackblitz or similar, I don't see this issue when I hit the
/tests
route directly, but in a brand-new local SvelteKit project (either the skeleton or the demo), I see it.The other slightly strange thing is that when I click through a link to this route from an index page, the page renders as expected, no errors at all. When I reload
/tests
, this error shows.Bug could be in vite's dev server rather than Sveltekit directly, but it's certainly impacting sveltekit.
Reproduction
npm run dev -- --open
link to tests
linktests
pageLogs
System Info
Severity
annoyance
Additional Information
When working with the static adapter, after a build, the
tests
route renders as expected during a refresh. If this should be re-filed with Vite, please let me know, I have actualtests
routes I'd like to support. You guys rule, thanks!The text was updated successfully, but these errors were encountered: