Kylee
Kylee

Reputation: 1675

AngularJS app won't load in iframe

I'm running in to an issue displaying an angularjs app in an iframe. A little bit of context: I'm developing a page to be displayed as an external question for Amazon's Mechanical Turk. The hit page loads but the question iframe is blank and is not loading the question on example.com/hit/1234

Refused to display * in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

https://workersandbox.mturk.com/mturk/preview?groupId=23G9U8P9Y38TKA4NLVLYLM0JTYGGXM

I've researched the error and its generally an issue with the page being embedded in the iframe setting headers to refuse this. I wrote the page and am not setting those headers. Help?

Upvotes: 1

Views: 4855

Answers (1)

Jason
Jason

Reputation: 15931

This is not related to angular. X-frame-options is a response header being sent by your web server. You should be able to modify it but it will require server configuration.

More info about the header here: https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options

Upvotes: 3

Related Questions