Question

Sorry for such a noob question, but I am just not figuring this out. I'm playing around with a Rails server, and for now I need to embed it in an iFrame. I've seen here and here how to change the x-frame options, but for the life of me I can't find out where I need to actually go to do this. I'm not sure if I need to just stick this somewhere in my app config file, my rails config file (which seems unlikely to me), but I'm obviously overlooking something.

(I don't know if this is necessary to know, but I'm running Ruby 1.9.3 and rails 4.0)

As always; thanks in advance everyone.

Was it helpful?

Solution

You put it in the config/application.rb file. Open up the file and you should be able to see where to add it. I'm using

config.action_dispatch.default_headers.merge!({'X-Frame-Options' => 'ALLOWALL'})

so that the other default headers are preserved

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top