我正在制作一个应用程序(如单点登录):
用户<==>应用<==>服务(https)
整个过程在HTTP中很好。但是当服务 A 在 HTTPS 下时,它就不起作用了。当用户被重定向到 A 网站时,步骤 3 中设置的 cookie 将消失。
response = HttpResponseRedirect('https://xxxx/service')
response.set_cookie(key=cookie.name, value=cookie.value,
domain=cookie.domain, path=cookie.path, expires=cookie.expires)
Run Code Online (Sandbox Code Playgroud)