Remove cors in webserver - duplicate

Cors enforcement already added to ngnx.conf
This commit is contained in:
zgrguric
2023-10-09 00:20:19 +02:00
committed by GitHub
parent 1eedd331ab
commit 873d73624d

View File

@@ -4,7 +4,6 @@ import express from 'express'
import expressWs from 'express-ws' import expressWs from 'express-ws'
import autoindex from 'express-autoindex/dist/index.cjs.js' import autoindex from 'express-autoindex/dist/index.cjs.js'
import nunjucks from 'nunjucks' import nunjucks from 'nunjucks'
import cors from 'cors'
import 'dotenv/config' import 'dotenv/config'
import 'wtfnode' import 'wtfnode'
@@ -63,7 +62,6 @@ if (!wss) {
// }) // })
app.use('/', app.use('/',
cors(),
(req, res, next) => { (req, res, next) => {
if (process.env?.TELEMETRY === 'YES' && !req.url.match(/health/)) { if (process.env?.TELEMETRY === 'YES' && !req.url.match(/health/)) {
const telemetryData = { const telemetryData = {