adds CORS headers to serveFile #812

Merged
jessopb merged 1 commit from CORS into master 2018-12-07 03:55:34 +01:00
Showing only changes of commit d8a2903e65 - Show all commits

View file

@ -8,6 +8,8 @@ const serveFile = ({ filePath, fileType }, res) => {
headers: { headers: {
'X-Content-Type-Options' : 'nosniff', 'X-Content-Type-Options' : 'nosniff',
'Content-Type' : fileType, 'Content-Type' : fileType,
'Access-Control-Allow-Origin' : '*',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept',
}, },
}; };
logger.debug(`fileOptions for ${filePath}:`, sendFileOptions); logger.debug(`fileOptions for ${filePath}:`, sendFileOptions);