Open JMLX42 opened 8 years ago
Hello,
I'm trying to use this module to proxy and cache some images coming from external services. It works when I don't set the cache option.
cache
exports.proxy = function(req, res, next) { if (!req.headers['referer']) return res.status(400).send(); var ref_parts = url.parse(req.headers['referer'], true); if (ref_parts.host != config.hostname) return res.status(400).send(); return requestProxy({ cache: redis.createClient(), cacheMaxAge: 3600, url: req.query.url })(req, res, next); }
The very same code works for other requests/mime-types such as plain HTML or text.
How can we solve this?
@promethe42 try: const redisClient = redis.createClient({ return_buffers: true });
Hello,
I'm trying to use this module to proxy and cache some images coming from external services. It works when I don't set the
cache
option.The very same code works for other requests/mime-types such as plain HTML or text.
How can we solve this?