jlarmstrongiv / astro-i18n-aut

The i18n integration for Astro 🧑‍🚀
https://www.npmjs.com/package/astro-i18n-aut
MIT License
132 stars 12 forks source link

Default locale route redirection loses query params #46

Closed HenglyEver closed 9 months ago

HenglyEver commented 10 months ago

When I go to the default locale route with some query params, it will redirect to base route without locale in path which is intended behavior but it loses the query params a long the way.

Step to reproduces

  1. Have en as default locale
  2. Go to baseUrl/en?foo=bar

Expected behavior Got redirected to baseUrl?foo=bar

Actual behavior Got redirected to baseUrl

jlarmstrongiv commented 10 months ago

Ahh, I missed that. Feel free to make the change in

https://github.com/jlarmstrongiv/astro-i18n-aut/blob/main/src/edge-runtime/middleware.ts

Or, I can take a look and fix it when I return from traveling in two weeks

jlarmstrongiv commented 9 months ago

@HenglyEver thanks for your patience! This issue should be fixed in 0.7.0. If not, please let me know and I’ll re-open this issue