Streamlit on Azure: Not working with HTTPS always on


I made a very simple Streamlit app to try out the deployment to Azure App Service. I dockerized the app , pushed the image to Container Registry and created an Azure Web Service plan with it - worked so far.

Now when clicking on the link (domain), I am seeing the error from this screenshot:

Under Configuration I already set up the Startup Command: python -m streamlit run --server.port 8501--server.address but for my company policy, I need to set “HTTPS only” to “On”. I can’t try out if it works with “Off” as my policy blocks saving the changes. But I have read that turning it to “Off” generally works.

As it is only possible for me with “On”, how can I make it work? I already upgraded SKU to B1 as this solved the problem for others, but without success for me.

For reference, my Dockerfile looks like this:

FROM --platform=linux/amd64 python:3.11.5

# Set the working directory inside the container


# Copy the requirements.txt file first to leverage Docker cache

# Install required Python packages

RUN pip install streamlit

# Copy the rest of the application files to the container's working directory

COPY . .

# Expose the port that Streamlit will run on


HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

# Command to run your Streamlit application

ENTRYPOINT ["streamlit", "run", "", "--server.port=8501", "--server.address="]

Thanks for helping!!

I have the same problem, I’m though delpoying the app either from Github repo or vscode. Did you find solution?