Skip to content

Allow setting 'url' to work with Vite development server#327

Open
benoitlahoz wants to merge 6 commits intokartikk221:masterfrom
benoitlahoz:master
Open

Allow setting 'url' to work with Vite development server#327
benoitlahoz wants to merge 6 commits intokartikk221:masterfrom
benoitlahoz:master

Conversation

@benoitlahoz
Copy link
Copy Markdown

@benoitlahoz benoitlahoz commented Dec 6, 2024

This PR is related to #324, #249 and #22.

Vite middlewares used in development server for Server-Side Rendering are writing to ExpressRequest's originalUrl (HyperExpress Request's url).

Additionally, they call the writeHead method of the ExpressResponse, which appears to have been removed from Express, but may be used by Vite on the http module response directly.

This PR adds setters for originalUrl and url, and implements the writeHead method on the ExpressResponse.

A working example can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant