Skip to content

use originalUrl to detect request for a wasm file#36

Open
Mati20041 wants to merge 1 commit intonshen:mainfrom
Mati20041:main
Open

use originalUrl to detect request for a wasm file#36
Mati20041 wants to merge 1 commit intonshen:mainfrom
Mati20041:main

Conversation

@Mati20041
Copy link
Copy Markdown

In the newest vite (tested on 5.3.4) the req.url is changed by htmlFallbackMiddleware to /index.html if there is no available resource (ie. in /public directory) under the requested url. It stores the original browser's path in req.originalUrl.

I fixed it because I'm starting to learn about using Rust in the webassembly and I like this plugin :)

@nshen
Copy link
Copy Markdown
Owner

nshen commented Jul 26, 2024

hi @Mati20041 thanks for you PR, please check
#34

@Mati20041
Copy link
Copy Markdown
Author

@nshen Hi! thanks for the proposition, but I'm not quite sure if I'll stick to the rust ecosystem for a longer time. I'm still exploring it :)

@haywirez
Copy link
Copy Markdown

haywirez commented Oct 6, 2024

Looks good to me, fixed my issue 👍

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.

3 participants