feat: Implement Next.js middleware for subdomain-based tenant routing and authentication, create the admin application's main page, and add Google site verification.

This commit is contained in:
Timo Knuth
2026-03-02 23:01:21 +01:00
parent 9d71c16883
commit 873c5e53af
4 changed files with 155 additions and 9 deletions

View File

@@ -13,7 +13,11 @@ const PUBLIC_PREFIXES = [
const PUBLIC_EXACT_PATHS = ['/']
// Reserved subdomains that shouldn't be treated as tenant slugs
const RESERVED_SUBDOMAINS = ['www', 'app', 'admin', 'localhost', 'superadmin', 'api']
const RESERVED_SUBDOMAINS = [
'www', 'app', 'admin', 'localhost', 'superadmin', 'api',
'logo.png', 'favicon.ico', 'robots.txt', 'sitemap.xml',
'apple-touch-icon', 'android-chrome', 'manifest'
]
export function middleware(request: NextRequest) {
const url = request.nextUrl