Skip to content

[codex] Activate consolidated locale middleware - #28

Draft
Egonso wants to merge 1 commit into
mainfrom
codex/routing-locale-middleware
Draft

[codex] Activate consolidated locale middleware#28
Egonso wants to merge 1 commit into
mainfrom
codex/routing-locale-middleware

Conversation

@Egonso

@Egonso Egonso commented May 7, 2026

Copy link
Copy Markdown
Owner

What changed

  • Makes root middleware.ts re-export the consolidated src/middleware.ts, so the locale/course-domain routing logic is actually active from the root middleware entrypoint.
  • Adds canonical redirects from legacy favicon paths to /register-logo.png.
  • Forces the canonical kiregister.com root to /de while preserving query params and setting NEXT_LOCALE=de.
  • Hardens hostname resolution with request.nextUrl.hostname as fallback when proxy host headers are absent.
  • Adds direct middleware behavior tests for the root re-export, German root redirect, favicon redirect, and eukigesetz.com course landing rewrite.

Why

The previous root middleware duplicated only the security/affiliate subset and did not delegate to the richer locale-aware middleware in src/middleware.ts. This made route behavior easier to drift.

Validation

  • npm run typecheck
  • npx eslint middleware.ts src/middleware.ts src/middleware-routing.test.ts --max-warnings 0
  • npx tsx --test src/middleware-routing.test.ts
  • git diff --check

@netlify

netlify Bot commented May 7, 2026

Copy link
Copy Markdown

Deploy Preview for pumuckels failed.

Name Link
🔨 Latest commit 9443cf8
🔍 Latest deploy log https://app.netlify.com/projects/pumuckels/deploys/69fcd7a040361b000860445d

@netlify

netlify Bot commented May 7, 2026

Copy link
Copy Markdown

Deploy Preview for studio-egonso ready!

Name Link
🔨 Latest commit 9443cf8
🔍 Latest deploy log https://app.netlify.com/projects/studio-egonso/deploys/69fcd7a0e67120000811a68d
😎 Deploy Preview https://deploy-preview-28--studio-egonso.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

2 participants