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 App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,910 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Evgeny Grishchenko 486 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?

    0 comments No comments

  2. Evgeny Grishchenko 486 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

    0 comments No comments