可以将内部ALB连接到私有Route 53并进行SSL身份验证吗?

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

Can I connect internal alb to private route 53 and proceed with SSL authentication?

问题

请将面向互联网的负载均衡器放在公共区域,并将其发送到React。然后React调用与内部ALB相连的后端。换句话说,前端可以调用内部ALB。通过将内部ALB的地址应用于私有路由53,可以创建'example.local'。我尝试在React中连接它,但它被发送为HTTP请求,而React主页是HTTPS的,导致混合内容错误。有解决这个问题的方法吗?

后端和前端通过ECS目标服务于不同的集群。

英文:

Place the internet facing load balancer in the public area and it is sent to React. Then react calls the backend connected to the internal alb. In other words, internal alb can be called in frontend. And by applying the address of internal alb to private route 53, 'example.local' could be created. And I tried to connect this in react, but it was sent as an http request, and the react homepage was in https, causing a mixed content error.
Is there a way to solve this?

Backend and frontend are serviced by different clusters through ecs target.

答案1

得分: 0

如果您遇到混合内容错误,那意味着您的请求来自Web浏览器,而不是后端服务器。由于您正在使用React,这是一个前端JavaScript框架,因此对后端的请求来自每个用户的笔记本电脑/台式电脑,而不是来自前端Web服务器。这意味着后端API不能位于内部负载均衡器后面,因为这样就无法从用户的Web浏览器中访问它。

英文:

If you are getting a mixed content error, then that means your requests to the backend are coming from the web browser, not a back-end server. Since you are using React, which is a front-end JavaScript framework, requests to your backend are coming from each user's laptop/desktop computer, not from your front-end web server. This means the backend API cannot be behind an internal load balancer, because then it wouldn't be accessible from the user's web browser.

huangapple
  • 本文由 发表于 2023年2月16日 19:37:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/75471708.html
匿名

发表评论

匿名网友

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

确定