Closed sunilsabatp closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
planet-webapp | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 5, 2024 11:28am |
planet-webapp-multi-tenancy-setup | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 5, 2024 11:28am |
The middleware in middleware.ts
was updated to include redirection logic based on URL parameters locale
and embed
. If the embed
parameter is present and the locale
parameter is specified but different from the current path's locale, it redirects to a new URL with the specified locale
.
File | Change Summary |
---|---|
middleware.ts |
Updated logic to handle locale and embed parameters for redirection if conditions are met. |
sequenceDiagram
participant User
participant Middleware
participant Server
User->>Middleware: HTTP Request with `embed` and `locale` params
Middleware->>Middleware: Check `embed` and `locale`
alt Embed is present and locale differs
Middleware->>User: Redirect to URL with `paramLocale`
else Embed is absent or locale matches
Middleware->>Server: Process request as usual
Server->>User: HTTP Response
end
In the land of code, with bytes that race,
A rabbit hopped into middleware's space. 🌐
Whispering secrets of locales and embeds,
Guiding paths where URL threads.
With a twist and turn, a redirect so neat,
The rabbit danced, the code felt complete. 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Closed as not needed any more