How do I get Sinatra to refrain from adding the X-Frame-Options header?

Sinatra uses Rack::Protection, in particular the frame_options option, which is what is setting the X-Frame-Options header. You can configure which protections are used. Sinatra turns most of them on by default, (some are only enabled if you also are using sessions, and Rack::Protection itself doesn’t enable some by default). To prevent sending the X-Frame-Options header … Read more

How to configure X-Frame-Options in Django to allow iframe embedding of one view?

You are going in the right direction, but exact decorator which you will need to achieve this is ‘xframe_options_exempt’. from django.http import HttpResponse from django.views.decorators.clickjacking import xframe_options_exempt @xframe_options_exempt def ok_to_load_in_a_frame(request): return HttpResponse(“This page is safe to load in a frame on any site.”) PS: DJango 1.6 is no longer supported. It is good time to … Read more

Adding X-Frame-Options header to all pages in MVC 4 application

There’s no need for a custom HttpModule or ActionFilter if you need it for every page. https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options details a much simpler solution: To configure IIS to send the X-Frame-Options header, add this your site’s Web.config file: <system.webServer> <!– … –> <httpProtocol> <customHeaders> <add name=”X-Frame-Options” value=”SAMEORIGIN” /> </customHeaders> </httpProtocol> <!– … –> </system.webServer>

Is there a client-side way to detect X-Frame-Options?

OK, this one is old but still relevant. Fact: When an iframe loads a url which is blocked by a X-Frame-Options the loading time is very short. Hack: So if the onload occurs immediately I know it’s probably a X-Frame-Options issue. Disclaimer: This is probably one of the ‘hackiest’ code I’ve written, so don’t expect … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)