how to iframe azurewebsite link from another site?

will.rash 1 Reputation point
2020-09-09T06:30:29.607+00:00

how to iframe azurewebsite link from another site? for example i have a site example.azurewebsites.net and want it to open on an iframe from my other site. coz when i tried it showed only white screen. can you please help me with this one?

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,321 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Evgeny Grishchenko 466 Reputation points
    2020-09-09T10:22:54.777+00:00

    It would be helpful to see your errors in the browser. Please, enable Developer Tools and look into the console.

    What is the error?

    No comments

  2. Evgeny Grishchenko 466 Reputation points
    2020-09-09T10:32:49.567+00:00

    Probably, you would see something like "Refused to display ...' in a frame because it set 'X-Frame-Options' to 'sameorigin'."

    You would need to add additional header to your example web site:

    Content-Security-Policy: frame-ancestors 'self' https://www.example.org;

    More details: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors

    No comments