How to Deploy a Flask Backend and Next.js Frontend Together in Azure Web Services
Ruddy Simonpour
0
Reputation points
We created an application using Next.js React for the front-end and Flask for the back-end. We successfully developed and tested the app locally using Docker. For deployment in Azure, we:
- Created a container registry
- Tagged Docker images
- Created individual Web App services for backend and frontend
However, during Azure deployment, we encountered a Mixed Content error:
- The frontend page loads over HTTPS
- An API request attempts to connect via HTTP
- Browser blocks the request with the message: "Mixed Content: The page at 'https://xxxxxxxxxx-xxxxxxxxxxxxxxxx.xxxxxxx-01.azurewebsites.net/login' was loaded over HTTPS, but requested an insecure resource '[http://xxxxxxxxxxxx-xxxxxxxxxxxxxxxx.xxxxxxx-01.azurewebsites.net/auth/login]'. This request has been blocked; the content must be served over HTTPS.
Sign in to answer