Skip to content

Instantly share code, notes, and snippets.

@skplunkerin
Last active December 20, 2016 18:21
Show Gist options
  • Save skplunkerin/865ed9b837562d2caaf3c915c32b2a8a to your computer and use it in GitHub Desktop.
Save skplunkerin/865ed9b837562d2caaf3c915c32b2a8a to your computer and use it in GitHub Desktop.
X-Frame-Options to SAMEORIGIN

In application_controller.rb

before_filter :allow_iframe_requests

def allow_iframe_requests
  # allows iframe testing in development
  # http://stackoverflow.com/a/17862331/1180523
  response.headers.delete('X-Frame-Options')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment