Use single quotes :P
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
const path = require("path");
|
||||
const etag = require("etag");
|
||||
const path = require('path');
|
||||
const etag = require('etag');
|
||||
|
||||
const getContentTypeHeader = require("../utils/getContentTypeHeader");
|
||||
const getContentTypeHeader = require('../utils/getContentTypeHeader');
|
||||
|
||||
function serveStaticFile(req, res) {
|
||||
const tags = ["file"];
|
||||
const tags = ['file'];
|
||||
|
||||
const ext = path.extname(req.entry.name).substr(1);
|
||||
if (ext) {
|
||||
@ -13,12 +13,12 @@ function serveStaticFile(req, res) {
|
||||
|
||||
res
|
||||
.set({
|
||||
"Content-Length": req.entry.size,
|
||||
"Content-Type": getContentTypeHeader(req.entry.contentType),
|
||||
"Cache-Control": "public, max-age=31536000, immutable", // 1 year
|
||||
"Last-Modified": req.entry.lastModified,
|
||||
'Content-Length': req.entry.size,
|
||||
'Content-Type': getContentTypeHeader(req.entry.contentType),
|
||||
'Cache-Control': 'public, max-age=31536000, immutable', // 1 year
|
||||
'Last-Modified': req.entry.lastModified,
|
||||
ETag: etag(req.entry.content),
|
||||
"Cache-Tag": tags.join(",")
|
||||
'Cache-Tag': tags.join(',')
|
||||
})
|
||||
.send(req.entry.content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user