mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
fix middleware order (#1865)
This commit is contained in:
parent
850693957c
commit
6b598b2401
2 changed files with 6 additions and 1 deletions
5
.changeset/heavy-boxes-deliver.md
Normal file
5
.changeset/heavy-boxes-deliver.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix middleware order
|
|
@ -83,8 +83,8 @@ export class AstroDevServer {
|
|||
|
||||
// Setup the dev server and connect it to Vite (via middleware)
|
||||
this.viteServer = await this.createViteServer();
|
||||
this.app.use((req, res, next) => this.handleRequest(req, res, next));
|
||||
this.app.use(this.viteServer.middlewares);
|
||||
this.app.use((req, res, next) => this.handleRequest(req, res, next));
|
||||
this.app.use((req, res, next) => this.renderError(req, res, next));
|
||||
|
||||
// Listen on port (and retry if taken)
|
||||
|
|
Loading…
Reference in a new issue