Skip to content

Open-source status page, incident response and uptime monitoring

fix: add incidents to public routes (#284)

Maximilian Kaskec5988b4bc651
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts
index 1a002f1a5..c56a69541 100644
--- a/apps/web/src/middleware.ts
+++ b/apps/web/src/middleware.ts
@@ -52,9 +52,6 @@ export const getValidSubdomain = (host?: string | null) => {
return subdomain;
};
-// used when trying subdomain slug via status.localhost:3000/incidents
-const publicRoutesDev = ["/incidents"];
-
export default authMiddleware({
publicRoutes: [
"/",
@@ -72,7 +69,8 @@ export default authMiddleware({
"/github",
"/oss-friends",
"/status-page/(.*)",
- ].concat(process.env.NODE_ENV === "development" ? publicRoutesDev : []),
+ "/incidents", // used when trying subdomain slug via status.documenso.com/incidents
+ ],
ignoredRoutes: ["/api/og", "/discord", "github"], // FIXME: we should check the `publicRoutes`
beforeAuth: before,
async afterAuth(auth, req) {