perf(imageproxy): do not set cookies to image proxy so CDNs can cache images (#3332)
CDNs such as Cloudflare bypass their cache if cookies are set in the response. clearCookies middleware removes the header before imageproxy serves the image.pull/3334/head
parent
33e7691b94
commit
966639df43
@ -0,0 +1,6 @@
|
||||
const clearCookies: Middleware = (_req, res, next) => {
|
||||
res.removeHeader('Set-Cookie');
|
||||
next();
|
||||
};
|
||||
|
||||
export default clearCookies;
|
Loading…
Reference in new issue