tag:后端 nodejs session ios iframe
總結(jié):
ios 版本 12.1.1 及以上
瀏覽器 通用(微信宪哩,chrome搂赋,safari)
在ios系統(tǒng)中 html標簽 iframe 被禁止第三方cookie
導致 iframe 里的頁面 保存不了cookie
導致 nodejs 丟失 session
場景 A
瀏覽器 內(nèi)地址 192.168.1.117/ddd.html
iframe 地址 192.168.1.117:3001
沒有問題
192.168.1.117 nginx
192.168.1.117:3001 nginx
192.168.1.128:3000 nodejs
nginx 代理 192.168.1.117:3001 -> 192.168.1.128:3000 (nodejs)
image.png
場景B
瀏覽器 內(nèi)地址 192.168.1.117/ddd.html
iframe 地址 192.168.1.128:3001
nodejs session 丟失
192.168.1.117 nginx
192.168.1.128:3001 nginx
192.168.1.128:3000 nodejs