From b70716fb5fbaab013bedd3f281567d09db5b46a8 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 19 Jun 2019 08:34:20 +0000 Subject: [PATCH] [UploadService]: Allow specific Origin for every request. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@56113 d315682c-612b-4755-9ff5-7f18f6832af3 --- services/upload/uploadService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/upload/uploadService.js b/services/upload/uploadService.js index e432c11c..8bf44e2c 100644 --- a/services/upload/uploadService.js +++ b/services/upload/uploadService.js @@ -60,7 +60,7 @@ app.use(function (req, res, next) { res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, x-xsrf-token'); next(); } else { - res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Origin', req.headers.origin); res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); next(); }