Closed panchenyu0928 closed 5 years ago
@panchenyu0928 I guess you're not using express, and hostname remains undefined. express uses 'X-Forwarded-Host' header field (if configured to trust proxy) to provide that field. I have fixed it to use req.host if req.hostname is not provided, but if you're behind reverse proxy, It won't have a meaningfull value.
Also if you're not serving multiple domains, disabling useHostPrefix
saves you some memory.
@arash16 Thank you!😊
/lib/middleware.js if config.cache.useHostPrefix === true context.req.hostname is undefined