-
Notifications
You must be signed in to change notification settings - Fork 289
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
fix(prerender): Encode URLs to preserve "," in X-Nitro-Prerender Header #701
Conversation
👷 Deploy request for nuxt-image-v1 pending review.Visit the deploys page to approve it
|
Thanks for the PR @posixpascal ❤️ We shall merge this PR after upstream nitrojs/nitro#799 got merged alongside with Nuxt 3.1 release awaiting Nitropack v2. |
Hmm thinking more, in the meantime, we might have a faster workaround. IPX supports |
It does indeed work by just replacing I still think a decode on nitropack is necessary when the filename themselves contain I've updated the PR. Let me know if you know a better place to solve the problem as I'm not familiar with the code base yet. |
Hey. Sorry for delay on this. Since Nitro v2 and Nuxt 3.1 with fix are coming soon (today/tomorrow) we can use more proper upstream fix in nitrojs/nitro#799. |
I've added the required codestyle changes. |
@posixpascal I can confirm that the images are now generated with '&' as separator in the folders. That's great! Thanks. |
Thanks for PR! Landed via #725 |
When using IPX provider in combination with
placeholder
attribute the final URL that will get added to theX-Nitro-Prerender
header contains a plain comma.Due to the way nitropack currently works this will break static generation of these images due to this LOC in nitropack:
You can reproduce the issue yourself with the latest NPM version of
@nuxt/image-edge
(^1.0.0-27840416.dc1ed65):When using the above vue component only one image will get statically generated when running
yarn run generate
.The placeholder image gets lost due to the URL being
/_ipx/q_50,s_10x10/images/logo.svg
which nitropack reads as:This bug is (closely) related to the following issues:
I've also opened a companion PR on nitropack here: nitrojs/nitro#799