Web API Error - This request has been blocked; the content must be served over HTTPS

前端 未结 4 2140
广开言路
广开言路 2021-02-07 21:47

We have deployed the api on azure and trying to consume in our web app written in angular 5. However when we try to consume the api we are getting following errors.

4条回答
  •  無奈伤痛
    2021-02-07 22:16

    The meta tag below helps to prevent Chrome complaining about HTTP request made. I was working on a class projects (a weather app) and the API call over HTTP and adding an S to the HTTP call doesn't help. Since this a project a there no major issue. The meta tag share above by @Medhi Ibrahim does the trick.

     http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    

提交回复
热议问题