0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2025-03-11 13:41:20 -05:00

Setup cors

This commit is contained in:
dragongoose 2023-04-16 16:01:13 -04:00
parent 7bf75fa99e
commit a7955614ff

View file

@ -11,6 +11,13 @@ dotenv.config()
const app: Express = express();
const port = process.env.PORT
app.all('/', function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
next();
});
app.use(compression({}))
app.use(routes)