简体   繁体   English

如何通过 https 提供内容

[英]how to serve a content over https

I am facing problem when I call an api end point url from a https page.当我从 https 页面调用 api 端点 url 时,我遇到了问题。 I have hosted my front-end code in aws s3 bucket and a third party ssl certificate is deployed .so my react code is served over https.我已经在 aws s3 存储桶中托管了我的前端代码,并部署了第三方 ssl 证书。所以我的反应代码是通过 https 提供的。 And my back-end is deployed inside a single instance application of elastic bean stalk.我的后端部署在弹性豆茎的单实例应用程序中。 while I am trying to call my back-end url from my front-end application, it is throwing the below error.当我试图从我的前端应用程序调用我的后端 url 时,它抛出以下错误。

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ''.混合内容:“”处的页面已通过 HTTPS 加载,但请求了不安全的 XMLHttpRequest 端点“”。 This request has been blocked;此请求已被阻止; the content must be served over HTTPS.内容必须通过 HTTPS 提供。

Can anyone help me to resolve this issue.谁能帮我解决这个问题。 Thanks.谢谢。

You need to setup your ELB (AWS Elastic Beanstalk) application to use SSL/HTTPS您需要设置您的 ELB (AWS Elastic Beanstalk) 应用程序以使用 SSL/HTTPS

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html

You can set this up with Route53 and AWS Certificate Manager (ACM).您可以使用 Route53 和 AWS Certificate Manager (ACM) 进行设置。

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

相关问题 创建react app如何通过https服务? - create react app how to serve it over https? 如何解决此请求已被阻止; 内容必须通过 HTTPS 提供 - how to solve This request has been blocked; the content must be served over HTTPS 如何使用 nginx 提供版本化的 static 内容? - How to serve versionned static content with nginx? ReactJS上的HTTPS和服务 - HTTPS on ReactJS and serve 如何使用https在本地网络上为gatsby开发服务? - How to serve gatsby development build on local network using https? 我如何通过https服务reactjs应用程序? - How can I serve a reactjs app through https? 如何在 AWS 弹性 beanstalk 实例上提供 HTTPS 数据 - How to serve HTTPS data on an AWS elastic beanstalk instance 混合内容:&#39;&#39;页面 <URL> &#39;是通过HTTPS加载的,但请求了一个不安全的字体&#39;&#39; - Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure font '' 混合内容:页面已通过 HTTPS 加载,但请求了不安全的图像 - Mixed-Content: The page was loaded over HTTPS, but requested an insecure image 混合内容:“https://***********.web.app/”页面已通过 HTTPS 加载,但请求了不安全的资源“http://ec2-/-/-/” -/-/-&#39; - Mixed Content: The page at 'https://***********.web.app/' was loaded over HTTPS, but requested an insecure resource 'http://ec2-/-/-/-/-/-'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM