Allow newly used header

This commit is contained in:
Ajay 2024-09-07 23:31:16 -04:00
parent 5fd6b5eb8b
commit d28ac39d4f

View file

@ -3,6 +3,6 @@ import { NextFunction, Request, Response } from "express";
export function corsMiddleware(req: Request, res: Response, next: NextFunction): void {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS, DELETE");
res.header("Access-Control-Allow-Headers", "Content-Type, If-None-Match");
res.header("Access-Control-Allow-Headers", "Content-Type, If-None-Match, x-client-name");
next();
}