0

This is giving me an exception:

Refused to display 'https://login.microsoftonline.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

Is there any other way to access an external URL in a pop up?

<div class="wrapper">
  <div class="container">
    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
      Launch demo modal
    </button>

    <div class="modal fade" id="EmailOffice365Modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <iframe src="https://login.microsoft.com/" name="myIframe" class="w-100 h-100"></iframe>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">
              Close
            </button>
            <button type="button" class="btn btn-primary">Save changes</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • No, there's no workaround for `X-Frame-Options` disallowing display in a third party site. It's a security restriction – Rory McCrossan May 26 '21 at 09:51
  • is any other way to open or access this URL apart from iframe. i want to access site from pop up only any workaround might be helpful – Vivek Chavan May 26 '21 at 09:54
  • Nope. There's lots of security restrictions around displaying third party content within a site to prevent phishing/spoofing attacks. – Rory McCrossan May 26 '21 at 09:55

0 Answers0