Deploy Node application in App Services (Windows)

Boopathy, Elango 106 Reputation points

Hi Team,

We have an Angular 6 frontend app running in node js server and finally deployed in Azure App services (Windows). This app is trying to access backend HTTP REST API.
However App services content served in HTTPS site, we were not able to make a HTTP call to our backend microservice.

We encounter below issue , it says the content must be served over HTTPS. Could you kindly assist on how to make a backend HTTP call from angular app.

Error: "Mixed Content: The page at <<site_name>> was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint <<backend url>>. This request has been blocked; the content must be served over HTTPS

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
4,900 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ryan Hill 18,396 Reputation points Microsoft Employee

    If you don't own the backend REST API service, one suggestion is a Logic App. You can create a logic app as a wrapper for the REST API that can forward request from your front end to your API return the response. Another option is creating a reverse proxy in your node application.

  2. Steve Padmore 1 Reputation point

    Hi @Boopathy, Elango ,

    this is likely caused by you loading a page of your site in the browser using HTTPS (secure), then a link (or some ajax call) on the page attempting to load content using HTTP (not secure). This is prevented to stop accidental loading of unsecured content into a page that was loaded using SSL.

    The best way to remedy this is to configure your API to use SSL (if not already doing so), then use HTTPS for the call to the API.