refactored nginx configs

- handle CORS within nginx
- remove allow-headers from CORS
- add custom dynamic error pages
- remove unused fastcgi
- removed OPTIONS backend
- remove previous custom errorDirective
- moved proxy directives to appropiate file
This commit is contained in:
Michael C
2022-01-06 18:42:48 -05:00
parent da03958e97
commit 164a9dab17
8 changed files with 59 additions and 69 deletions

View File

@@ -2,7 +2,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-Headers", "X-Requested-With, Content-Type, Accept");
res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS, DELETE");
next();
}