Call an HTTP API endpoint running on azure VM from azure app service.

Muhammed Ashiq Abdul Khader 20 Reputation points
2023-11-19T16:30:49.1966667+00:00

Hello,

I have a FastAPI application running on a VM. It has an HTTP API end point. I want to talk to this API from an App Service. I am getting this error.

'''

The page at 'https://

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

Accepted answer
  1. Dillon Silzer 56,206 Reputation points
    2023-11-19T19:03:49.17+00:00

    Hello,

    #1 You can try adding the following to your page's <head></head> (I wouldn't recommend this, but you can try)

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

    #2 I'd recommend enabling a HTTPS connection:

    https://fastapi.tiangolo.com/deployment/https/

    There are free SSL certificates out there that even auto-renew. However, if you are going to be serving private and confidential data, I'd recommend buying your own SSL certificate (I usually recommend a wildcard certificate).


    If this is helpful please accept answer.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful