-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer (allowed) static assets to routes (#5070)
* failing test for #5066 * allow vite to serve files where appropriate * print helpful 403 in dev * Update packages/kit/src/vite/dev/index.js * try and figure out why windows is failing * try this * store protocol and verbose instead of vite_config * neaten up * account for server.fs.strict * Update packages/kit/test/apps/basics/test/test.js Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> * Create nice-boxes-exercise.md Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
- Loading branch information
1 parent
897dcd7
commit a6e3072
Showing
6 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sveltejs/kit": patch | ||
--- | ||
|
||
Serve static assets before routes in dev, but only if in an allowed directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export function get() { | ||
return { | ||
body: { | ||
works: true | ||
} | ||
}; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/kit/test/apps/basics/src/routes/src/[...anything].js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import('./__types/[...anything]').RequestHandler} */ | ||
export function get() { | ||
return { | ||
body: 'dynamically rendered file' | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters