From f94ea798b42570fe92cab151c378f5c8041c5cf6 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 19 Feb 2018 21:43:42 +0000 Subject: [PATCH] Add CORS response header for raw get path --- lib/document_handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/document_handler.js b/lib/document_handler.js index 68985ec..a5e89a7 100644 --- a/lib/document_handler.js +++ b/lib/document_handler.js @@ -36,7 +36,7 @@ DocumentHandler.prototype.handleRawGet = function(key, response, skipExpire) { this.store.get(key, function(ret) { if (ret) { winston.verbose('retrieved raw document', { key: key }); - response.writeHead(200, { 'content-type': 'text/plain' }); + response.writeHead(200, { 'content-type': 'text/plain', 'Access-Control-Allow-Origin': '*' }); response.end(ret); } else {