MFC*_*izo 5 cookies firefox gcloud google-kubernetes-engine
根据手册页:https : //cloud.google.com/load-balancing/docs/backend-service#http_cookie_affinity
HTTP cookie 亲和性根据 HTTP_COOKIE 标志中指定的 HTTP cookie 将请求路由到 NEG 中的后端虚拟机或端点。如果客户端不提供 cookie,代理会生成 cookie 并在
Set-Cookie标头中将其返回给客户端。
但是由于 Firefox 中的新安全更改,出现以下警告:
Cookie “GCLB” will be soon rejected because it has the “sameSite” attribute set to “none” or an invalid value, without the “secure” attribute. To know more about the “sameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Cookies
我找不到配置负载均衡器以修改 sameSite 属性的方法。
例如,在 mozilla firefox (76.0.1 (64-bit)) 中打开网站:https: //staging.krizo.dk/ 在控制台中显示上述警告消息。( https://paste.pics/979RL ) (cookie 图片:https : //paste.pics/979TR )
要重现的示例后端配置:
apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
name: example-name-config
spec:
timeoutSec: 7200
connectionDraining:
drainingTimeoutSec: 30
sessionAffinity:
affinityType: "GENERATED_COOKIE" #"Client_IP" #ClientIP or NONE
affinityCookieTtlSec: 86400
Run Code Online (Sandbox Code Playgroud)
和入口资源:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
annotations:
ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: gce
cloud.google.com/neg: '{"ingress": true}'
beta.cloud.google.com/backend-config: '{"ports": {"80":"example-name-config"}}'
ingress.kubernetes.io/enable-cors: "true"
labels:
purpose: example-name-config
<...>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
642 次 |
| 最近记录: |