How to deny iframe embedding for my Azure Web App

Simon Sefcik 20 Reputation points
2024-08-27T14:33:23.93+00:00

Hello there,

I deployed an streemlit app to azure web app, so requirements.txt and one other .py file; hosting is done by running the command below

python -m streamlit run app.py --server.port 8000 --server.address 0.0.0.0

The issue is that anyone can embed my application using the


I have CORS disabled, but is there in azure portal setting, where i can explicitly set what headers to accept and which ones not??

Because i would like to deny all iframe embedding requests, maybe except a one chosen url.

Thanks for your help!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,880 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
957 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Simon Sefcik 20 Reputation points
    2024-08-29T10:56:29.77+00:00

    Okay i will just use flask or whatever where i explicitly set it as:

    response.headers["X-Frame-Options"] = "DENY"

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.