HTTP到HTTPS重定向在GKE上的实现

huangapple go评论53阅读模式
英文:

HTTP to HTTPS redirect on GKE

问题

我需要将流量从HTTP重定向到HTTPS,但我需要使用:ingress.class:gce-internal来实现这一要求。据我了解,GCP目前不支持gce-internal类别的重定向。因此,我联系社区,了解是否有其他方法来实现相同的目标。

英文:

I have a requirement wherein i need to redirect traffic from http to https however this i need to implement using : ingress.class: gce-internal.
As per my understanding GCP currently does not support this re-direction for gce-internal class.
Therefore, reaching out to the community to understand if there are some alternative ways of accomplishing the same.

答案1

得分: 1

如果您正在使用GCP,并且在您的Ingress资源中使用ingress.class: gce-internal,那么GCP不支持将HTTP自动重定向到HTTPS的功能是正确的。然而,有其他的方式可以在您的应用程序或基础架构中实现HTTP到HTTPS的重定向,比如:

  • 在您的应用程序中处理重定向
  • 使用负载均衡器或反向代理
  • 利用外部服务
英文:

If you are using GCP and the ingress.class: gce-internal for your Ingress resource, it's a correct that GCP does not support automatic redirection from HTTP to HTTPS for gce-internal class. However, there are alternative ways to accomplish the HTTP to HTTPS redirection within your application or infrastructure.
such as

-Handle redirection in your application

-Use a load balancer or reverse proxy

-Utilize external services

huangapple
  • 本文由 发表于 2023年5月22日 19:56:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76305931.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定