Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: add static local domain

Marc Seitz2b9e539801c4
diff --git a/middleware.ts b/middleware.ts
index 1eca561a..65ad0cee 100644
--- a/middleware.ts
+++ b/middleware.ts
@@ -22,13 +22,14 @@ export default async function middleware(req: NextRequest, ev: NextFetchEvent) {
const host = req.headers.get("host");
if (
- process.env.NODE_ENV !== "development" &&
+ (process.env.NODE_ENV === "development" && host?.includes("papermark-dev.local")) ||
+ (process.env.NODE_ENV !== "development" &&
!(
host?.includes("localhost") ||
host?.includes("papermark.io") ||
host?.endsWith(".vercel.app")
)
- ) {
+ )) {
return DomainMiddleware(req);
}