mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-15 16:07:03 +03:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user