1
0

Fix cors config

This commit is contained in:
2021-11-04 00:07:13 +01:00
parent 16d73fa240
commit 57a26ef6cd

View File

@@ -230,11 +230,11 @@ class Router {
cors(config) { cors(config) {
config = config || {} config = config || {}
this.corsConfig = { this.corsConfig = {
allowOrigin: '*', allowOrigin: config.allowOrigin || '*',
allowMethods: '*', allowMethods: config.allowMethods || '*',
allowHeaders: '*', allowHeaders: config.allowHeaders || '*, Authorization',
maxAge: 86400, maxAge: config.maxAge || 86400,
optionsSuccessStatus: 204 optionsSuccessStatus: config.optionsSuccessStatus || 204
} }
return this return this
} }