问题原文
原帖链接 · Tianyi Cui · CC BY-SA 3.0
I'm using nginx as a reverse proxy to serve a https-only site. So I want the cookies for this site flagged as secure. But the backend server is an http one so it won't set the secure flag to its cookies. How can I modify the Set-Cookie header in response to add a secure flag?
已采纳解答
原帖链接 · Jon Rhoades · CC BY-SA 3.0
You might be able to get your nginx proxy modify the cookies created by the backend and set the secure flag - for inspiration see How to rewrite the domain part of Set-Cookie in a nginx reverse proxy?.
However I'd imagine that getting whatever is creating the cookie on the backend to set the secure flag is going to be a better solution. How you do that is another story (or question :).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
