Add CORS response header for raw get path

This commit is contained in:
Luck 2018-02-19 21:43:42 +00:00
parent ad7702aaf4
commit f94ea798b4
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ DocumentHandler.prototype.handleRawGet = function(key, response, skipExpire) {
this.store.get(key, function(ret) { this.store.get(key, function(ret) {
if (ret) { if (ret) {
winston.verbose('retrieved raw document', { key: key }); 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); response.end(ret);
} }
else { else {