Skip to content
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

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

benoitlahoz
Copy link

@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