diff --git a/lib/AzuriteBlob.js b/lib/AzuriteBlob.js index f0b7a10..4a69daa 100644 --- a/lib/AzuriteBlob.js +++ b/lib/AzuriteBlob.js @@ -63,6 +63,7 @@ class AzuriteBlob { require('./routes/blob/ContainerRoute')(app); require('./routes/blob/BlobRoute')(app); require('./routes/blob/NotFoundRoute')(app); + app.use(require('./middleware/blob/cors')); app.use(require('./middleware/blob/authentication')); app.use(require('./middleware/blob/validation')); app.use(require('./middleware/blob/actions')); diff --git a/lib/actions/blob/GetBlobServiceProperties.js b/lib/actions/blob/GetBlobServiceProperties.js index 78f81f8..983bdd6 100644 --- a/lib/actions/blob/GetBlobServiceProperties.js +++ b/lib/actions/blob/GetBlobServiceProperties.js @@ -9,7 +9,7 @@ class GetBlobServiceProperties { } process(request, res) { - storageManager.getBlobServiceProperties(request) + storageManager.getBlobServiceProperties() .then((response) => { const xml = js2xmlparser.parse('StorageServiceProperties', response.payload.StorageServiceProperties || []); res.set(response.httpProps); diff --git a/lib/core/blob/StorageManager.js b/lib/core/blob/StorageManager.js index 1d49736..2d280e6 100644 --- a/lib/core/blob/StorageManager.js +++ b/lib/core/blob/StorageManager.js @@ -672,7 +672,7 @@ class StorageManager { return BbPromise.resolve(new AzuriteResponse({})); } - getBlobServiceProperties(request) { + getBlobServiceProperties() { const coll = this.db.getCollection(StorageTables.ServiceProperties); const settings = coll.where((e) => { return true; // there is always at most one entry in this collection diff --git a/lib/middleware/blob/cors.js b/lib/middleware/blob/cors.js index dc95109..c3ca913 100644 --- a/lib/middleware/blob/cors.js +++ b/lib/middleware/blob/cors.js @@ -10,7 +10,7 @@ const BbPromise = require('bluebird'), module.exports = (req, res, next) => { BbPromise.try(() => { const request = req.azuriteRequest; - sm.getBlobServiceProperties(request) + sm.getBlobServiceProperties() .then((response) => { if (response.payload.StorageServiceProperties && request.httpProps[N.ORIGIN]) { for (const rule of response.payload.StorageServiceProperties.Cors) {