forked from ppfun/pixelplanet
send etag on 304
This commit is contained in:
parent
90ffc5fd1a
commit
f6902ca73c
|
@ -46,6 +46,9 @@ export default async (req: Request, res: Response, next) => {
|
|||
const preEtag = req.headers['if-none-match'];
|
||||
|
||||
if (curEtag && preEtag === curEtag) {
|
||||
res.set({
|
||||
ETag: curEtag,
|
||||
});
|
||||
res.status(304).end();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user