Add a host-based rewrite in vercel.json to handle requests originating from Discord's proxy, ensuring the Activity page loads correctly. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: 6ccd8b82-c530-443f-95c3-e82995a96239 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/qPXTzuE Replit-Helium-Checkpoint-Created: true
159 lines
5.5 KiB
JSON
159 lines
5.5 KiB
JSON
{
|
|
"version": 2,
|
|
"buildCommand": "npm run build",
|
|
"outputDirectory": "dist/spa",
|
|
"functions": {
|
|
"api/**/*.ts": {
|
|
"memory": 1024,
|
|
"maxDuration": 30
|
|
}
|
|
},
|
|
"redirects": [
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "aethex.app" }],
|
|
"destination": "https://aethex.dev/:path",
|
|
"permanent": true
|
|
},
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "aethex.locker" }],
|
|
"destination": "https://aethex.dev/:path",
|
|
"permanent": true
|
|
},
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "aethex.studio" }],
|
|
"destination": "https://aethex.dev/ethos/:path",
|
|
"permanent": true
|
|
},
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "aethex.info" }],
|
|
"destination": "https://aethex.dev/foundation/:path",
|
|
"permanent": true
|
|
},
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "aethex.site" }],
|
|
"destination": "https://aethex.dev/:path",
|
|
"permanent": true
|
|
},
|
|
{
|
|
"source": "/",
|
|
"has": [{ "type": "host", "value": "aethex.me" }],
|
|
"destination": "https://aethex.dev/",
|
|
"permanent": true
|
|
},
|
|
{
|
|
"source": "/",
|
|
"has": [{ "type": "host", "value": "aethex.space" }],
|
|
"destination": "https://aethex.dev/",
|
|
"permanent": true
|
|
},
|
|
{
|
|
"source": "/feed",
|
|
"destination": "/community/feed",
|
|
"permanent": true
|
|
}
|
|
],
|
|
"rewrites": [
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "(?<proxy>.+)\\.discordsays\\.com" }],
|
|
"destination": "/index.html"
|
|
},
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "(?<sub>.+)\\.aethex\\.me" }],
|
|
"destination": "/index.html"
|
|
},
|
|
{
|
|
"source": "/:path(.*)",
|
|
"has": [{ "type": "host", "value": "(?<sub>.+)\\.aethex\\.space" }],
|
|
"destination": "/index.html"
|
|
},
|
|
{
|
|
"source": "/api/:path(.*)",
|
|
"destination": "/api/:path"
|
|
},
|
|
{ "source": "/", "destination": "/index.html" },
|
|
{ "source": "/login", "destination": "/index.html" },
|
|
{ "source": "/login/:path*", "destination": "/index.html" },
|
|
{ "source": "/dashboard", "destination": "/index.html" },
|
|
{ "source": "/dashboard/:path*", "destination": "/index.html" },
|
|
{ "source": "/profile", "destination": "/index.html" },
|
|
{ "source": "/profile/:path*", "destination": "/index.html" },
|
|
{ "source": "/activity", "destination": "/index.html" },
|
|
{ "source": "/activity/:path*", "destination": "/index.html" },
|
|
{ "source": "/admin", "destination": "/index.html" },
|
|
{ "source": "/admin/:path*", "destination": "/index.html" },
|
|
{ "source": "/creators", "destination": "/index.html" },
|
|
{ "source": "/creators/:path*", "destination": "/index.html" },
|
|
{ "source": "/opportunities", "destination": "/index.html" },
|
|
{ "source": "/opportunities/:path*", "destination": "/index.html" },
|
|
{ "source": "/nexus", "destination": "/index.html" },
|
|
{ "source": "/nexus/:path*", "destination": "/index.html" },
|
|
{ "source": "/foundation", "destination": "/index.html" },
|
|
{ "source": "/foundation/:path*", "destination": "/index.html" },
|
|
{ "source": "/gameforge", "destination": "/index.html" },
|
|
{ "source": "/gameforge/:path*", "destination": "/index.html" },
|
|
{ "source": "/labs", "destination": "/index.html" },
|
|
{ "source": "/labs/:path*", "destination": "/index.html" },
|
|
{ "source": "/corp", "destination": "/index.html" },
|
|
{ "source": "/corp/:path*", "destination": "/index.html" },
|
|
{ "source": "/devlink", "destination": "/index.html" },
|
|
{ "source": "/devlink/:path*", "destination": "/index.html" },
|
|
{ "source": "/community", "destination": "/index.html" },
|
|
{ "source": "/community/:path*", "destination": "/index.html" },
|
|
{ "source": "/developers", "destination": "/index.html" },
|
|
{ "source": "/developers/:path*", "destination": "/index.html" },
|
|
{ "source": "/discord-verify", "destination": "/index.html" },
|
|
{ "source": "/discord-verify/:path*", "destination": "/index.html" },
|
|
{ "source": "/ethos", "destination": "/index.html" },
|
|
{ "source": "/ethos/:path*", "destination": "/index.html" },
|
|
{ "source": "/:path*", "destination": "/index.html" }
|
|
],
|
|
"headers": [
|
|
{
|
|
"source": "/assets/(.*)",
|
|
"headers": [
|
|
{
|
|
"key": "Cache-Control",
|
|
"value": "public, max-age=31536000, immutable"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "/(.*).(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff2)",
|
|
"headers": [
|
|
{
|
|
"key": "Cache-Control",
|
|
"value": "public, max-age=31536000, immutable"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "/api/(.*)",
|
|
"headers": [{ "key": "Cache-Control", "value": "no-store" }]
|
|
},
|
|
{
|
|
"source": "/(.*)",
|
|
"headers": [
|
|
{ "key": "X-Content-Type-Options", "value": "nosniff" },
|
|
{
|
|
"key": "Referrer-Policy",
|
|
"value": "strict-origin-when-cross-origin"
|
|
},
|
|
{
|
|
"key": "Permissions-Policy",
|
|
"value": "geolocation=(), microphone=(), camera=()"
|
|
},
|
|
{
|
|
"key": "Content-Security-Policy",
|
|
"value": "default-src 'self' https: data: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: blob: https:; font-src 'self' data: https:; connect-src 'self' https: wss:; frame-ancestors 'self' https://discord.com https://*.discord.com https://*.discordsays.com"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|