diff --git a/server/prisma/dev.db b/server/prisma/dev.db index 88220ea..2ec2951 100644 Binary files a/server/prisma/dev.db and b/server/prisma/dev.db differ diff --git a/server/server.ts b/server/server.ts index 552569c..a2111cb 100644 --- a/server/server.ts +++ b/server/server.ts @@ -11,16 +11,13 @@ const prisma = new PrismaClient(); const app: Express = express(); app.use(express.json()); -app.use(helmet()); - -// Allow CORS in dev mode. -if (process.env.ENVIRONMENT == "dev") { - app.use( - cors({ - origin: "*", - }) - ); -} +app.use( + helmet({ + crossOriginResourcePolicy: { + policy: process.env.ENVIRONMENT == "dev" ? "cross-origin" : "same-origin", + }, + }) +); // Apply rate limiting const postLimiter = rateLimit({