mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-02-02 15:50:44 +03:00
Add csp for API
This commit is contained in:
6
src/middleware/apiCsp.ts
Normal file
6
src/middleware/apiCsp.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import {NextFunction, Request, Response} from 'express';
|
||||
|
||||
export function apiCspMiddleware(req: Request, res: Response, next: NextFunction) {
|
||||
res.header("Content-Security-Policy", "script-src 'none'");
|
||||
next();
|
||||
}
|
||||
Reference in New Issue
Block a user