0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/.changeset/blue-pens-divide.md
Emanuele Stoppa cb356a5db6
feat(i18n): expand fallback system (#11677)
* feat(i18n): expand fallback system

* rebase

* apply feedback

* better changeset

* update tests too

* apply feedback

* Update .changeset/blue-pens-divide.md

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

* update docs

* nitpick

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/blue-pens-divide.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/blue-pens-divide.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* fix regression

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 12:16:43 +01:00

644 B

astro
patch

Fixes a bug in the logic of Astro.rewrite() which led to the value for base, if configured, being automatically prepended to the rewrite URL passed. This was unintended behavior and has been corrected, and Astro now processes the URLs exactly as passed.

If you use the rewrite() function on a project that has base configured, you must now prepend the base to your existing rewrite URL:

// astro.config.mjs
export default defineConfig({
  base: '/blog'
})
// src/middleware.js
export function onRequest(ctx, next) {
-  return ctx.rewrite("/about")
+  return ctx.rewrite("/blog/about")
}