This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cross frame Scripting

 
lakshmi gullapudi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to add X-frame options header in .htm file

its working fine when i add <% response.addHeader("X-Frame-Options", "SAMEORIGIN"); %> in JSP page.

But not sure how to add X-frame options in .htm file?

Can any one please help me?

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34423
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can turn it into a JSP . You can also have your web server (for example Apache) set the headers - I've never needed to do that though.

You can't add this header directly to a HTML file.
 
Rob Crowther
author
Ranch Hand
Posts: 297
5
Android Fedora Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would have to configure your web server to send the header, either with all requests or just for requests matching a particular pattern. MDN has some instructions for Apache and nginx.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic