cors: Fix cors to allow any if site allows cors
continuous-integration/appveyor/branch AppVeyor build succeeded Details

master v2.2.9
Jonatan Nilsson 2023-11-15 10:07:20 +00:00
parent 81c9603ea0
commit 8d0265d0fe
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ export default class MediaRoutes {
server.flaska.post('/media/resize', [server.queryHandler()], this.resize.bind(this))
server.flaska.post('/media/resize/:filename', [server.queryHandler(), server.jsonHandler()], this.resizeExisting.bind(this))
server.flaska.delete('/media/:filename', [server.queryHandler()], this.remove.bind(this))
server.flaska.options('/::path', [server.queryHandler(), this.security.verifyCorsEnabled], CorsHandler({}))
server.flaska.options('/::path', [server.queryHandler(), this.security.verifyCorsEnabled], CorsHandler({ allowedOrigins: ['*'] }))
}
init(server) {

View File

@ -1,6 +1,6 @@
{
"name": "storage-upload",
"version": "2.2.8",
"version": "2.2.9",
"description": "Micro service for uploading and image resizing files to a storage server.",
"main": "index.js",
"scripts": {
@ -42,7 +42,7 @@
},
"homepage": "https://github.com/nfp-projects/storage-upload#readme",
"dependencies": {
"flaska": "^1.2.3",
"flaska": "^1.3.5",
"formidable": "^1.2.2",
"nconf-lite": "^2.0.0",
"sharp": "^0.30.3"