Skip to content

Commit

Permalink
set url to originalUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Oct 25, 2022
1 parent 918d372 commit be01da3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/kit/src/exports/vite/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ export async function dev(vite, vite_config, svelte_config) {
remove_static_middlewares(vite.middlewares);

vite.middlewares.use(async (req, res) => {
// Vite's base middleware strips out the base path. Restore it
req.url = req.originalUrl;
try {
const base = `${vite.config.server.https ? 'https' : 'http'}://${
req.headers[':authority'] || req.headers.host
Expand Down

0 comments on commit be01da3

Please sign in to comment.