-1

Unable to display www.imdb.com in iframe in angular2 even after using domSanitizer and SafeResourceUrl. But can display Yelp using those.

The error I get is "Refused to display http://www.imdb.com/showtimes/location/US/12345' in a frame because an ancestor violates the following security Policy directive:"frame-ancestors self imdb.com"

All Іѕ Vаиітy
  • 24,861
  • 16
  • 87
  • 111

1 Answers1

1

This is not an angular issue or whatsoever, imdb.com is sending an "X-Frame-Options: SAMEORIGIN" header. This header prevents showing the site in an iFrame except if a page containing an iFrame is hosted on the same parent domain (imdb.com in this case).

You can find more information on the Mozilla Developer Network

Owain van Brakel
  • 3,109
  • 1
  • 15
  • 22