adds CORS headers to serveFile

This commit is contained in:
jessop 2018-12-05 14:54:14 -05:00
parent f790ae19de
commit d8a2903e65

View file

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