NGINX caching for HTTPS

三世轮回 提交于 2021-01-28 05:14:55

问题


I am exploring Nginx cache, everything works as long as I access the resource through HTTP . But as soon as I use HTTPS , Nginx dont put data in cache. I always see MISS in response headers. Does I need to do anything extra for HTTPS or ignore few headers which gets added by default for HTTPS ?

I see HIT when I access the same resource through HTTP which was not working in HTTPS. And once it gets cached HTTPS also return from the cahce as I can see HIT in response header. Somehow HTTPS is not able to put in the cache. tried below setting also proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie; proxy_ignore_headers Set-Cookie; proxy_ignore_headers Cache-Control;


回答1:


I got it. It was becauuse of proxy_buffer in HTTPS. Removed it. working fine now.



来源:https://stackoverflow.com/questions/43915693/nginx-caching-for-https

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!