mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
added cors options
This commit is contained in:
parent
de775f07a8
commit
31733fcd72
@ -7,7 +7,12 @@ const app = express()
|
||||
const portFromArgs = process.argv[2]
|
||||
let portListen = portFromArgs ? portFromArgs : 9000
|
||||
|
||||
app.use(cors())
|
||||
app.use(cors({
|
||||
origin: "*",
|
||||
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
|
||||
preflightContinue: true,
|
||||
optionsSuccessStatus: 204
|
||||
}))
|
||||
|
||||
app.use(express.static(path.join(__dirname, "dist")))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user