WebFaction
Community site: login faq

Hi All,
I want to set X-Frame options for the Web2Py application. I am referring link:The x-frame options response header MDN According to this documentation, I've to add following line to the nginx.conf file

add_header X-Frame-Options options

But the problem is nginx.conf file is being shared as well as we don't access to nginx setup. We also don't want to use custom nginx setup. Is there any way to set X-Frame Options in nginx?

asked 08 Dec '14, 12:02

rootpy
3613
accept rate: 100%


One of my colleagues has given me the best solution on this problem.

I've set X-Frame options for Web2Py itself [models/db.py]

response.headers['X-Frame-Options'] = 'SAMEORIGIN'

It works as expected.

permanent link

answered 08 Dec '14, 16:29

rootpy
3613
accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×74
×33
×24
×16

question asked: 08 Dec '14, 12:02

question was seen: 3,061 times

last updated: 08 Dec '14, 16:29

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM