简体   繁体   English

如果我在 Cloudfront 上启用了 SSL,AWS ALB 是否需要 SSL?

[英]Is SSL required on AWS ALB if I have SSL enabled on Cloudfront?

I have an application that is hosted on AWS.我有一个托管在 AWS 上的应用程序。 It has an ALB in front of the application servers.它在应用程序服务器前面有一个 ALB。 In order to handle a huge load, I have also added Cloudfront in front of the AWS Application Load Balancer (ALB).为了处理巨大的负载,我还在 AWS Application Load Balancer (ALB) 前面添加了 Cloudfront。 Cloudfront is configured for dynamic website content. Cloudfront 针对动态网站内容进行了配置。 I'm using a custom domain name for the CloudFront along with an SSL certificate.我正在使用 CloudFront 的自定义域名以及 SSL 证书。

When loading the application, I'm getting errors like:加载应用程序时,我收到如下错误:

(blocked:mixed-content) (阻止:混合内容)

I thought that, if we enable SSL on CloudFront it will be enough for security similar to the SSL offloading feature on Load Balancer.我认为,如果我们在 CloudFront 上启用 SSL,那么对于类似于负载均衡器上的 SSL 卸载功能的安全性就足够了。

Do we need to enable SSL on ALB in order to avoid this error?我们是否需要在 ALB 上启用 SSL 以避免此错误?

If yes, do we need to add a domain name for the ALB and issue a certificate?如果是,我们是否需要为 ALB 添加域名并颁发证书?

Is there any other fix for this issue?这个问题还有其他解决方法吗? Any help will be appreciated.任何帮助将不胜感激。

Actually, In the frontend code, I have added the ALB URL of the backend.实际上,在前端代码中,我添加了后端的 ALB URL。 When I replace that with the newly created Cloudfront URL, the issue got resolved.当我用新创建的 Cloudfront URL 替换它时,问题得到了解决。

Right now, the frontend and backend URLs are HTTPS, hence resolved the issue.现在,前端和后端的 URL 是 HTTPS,因此解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM