0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2025-03-12 06:01:37 -05:00
safetwitch-backend/util/cors.ts
2023-04-16 16:09:07 -04:00

9 lines
No EOL
305 B
TypeScript

import { NextFunction, Request, Response } from "express";
export const cors = () => {
return (req: Request, res: Response, next: NextFunction) => {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
next();
}
}