Openstatus www.openstatus.dev

wtf: rewrite

+17 -4
+17 -4
apps/web/next.config.js
··· 107 107 ], 108 108 destination: "https://www.stpg.dev/:domain/:path*", 109 109 }, 110 + // Handle API routes for custom domains 110 111 { 111 - source: 112 - "/:path((api|assets|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)", 112 + source: "/api/:path*", 113 + has: [ 114 + { type: "cookie", key: "sp_mode", value: "new" }, 115 + { 116 + type: "host", 117 + value: 118 + "^(?!.*\\.openstatus\\.dev$)(?!openstatus\\.dev$)(?<domain>.+)$", 119 + }, 120 + ], 121 + destination: "https://www.stpg.dev/api/:path*", 122 + }, 123 + // Handle static assets for custom domains 124 + { 125 + source: "/_next/:path*", 113 126 has: [ 114 127 { type: "cookie", key: "sp_mode", value: "new" }, 115 128 { ··· 118 131 "^(?!.*\\.openstatus\\.dev$)(?!openstatus\\.dev$)(?<domain>.+)$", 119 132 }, 120 133 ], 121 - destination: "https://www.stpg.dev/:path*", 134 + destination: "https://www.stpg.dev/_next/:path*", 122 135 }, 123 136 ], 124 137 }; ··· 152 165 153 166 // Automatically tree-shake Sentry logger statements to reduce bundle size 154 167 disableLogger: true, 155 - }, 168 + } 156 169 );