Skip to content

Commit

Permalink
Merge pull request #429 from dionyziz/x_frame_options
Browse files Browse the repository at this point in the history
X-Frame-Options: DENY. Fix #428
  • Loading branch information
sophron committed Sep 5, 2014
2 parents 7093cf9 + 05fdf1e commit b72358d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion node/tornadoloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def get(self):
self.redirect("/html/index.html")


class OpenBazaarStaticHandler(tornado.web.StaticFileHandler):
def set_extra_headers(self, path):
self.set_header("X-Frame-Options", "DENY")


class MarketApplication(tornado.web.Application):
def __init__(self, market_ip, market_port, market_id=1,
bm_user=None, bm_pass=None, bm_port=None, seed_peers=[],
Expand Down Expand Up @@ -54,7 +59,7 @@ def post_joined():
handlers = [
(r"/", MainHandler),
(r"/main", MainHandler),
(r"/html/(.*)", tornado.web.StaticFileHandler, {'path': './html'}),
(r"/html/(.*)", OpenBazaarStaticHandler, {'path': './html'}),
(r"/ws", WebSocketHandler,
dict(transport=self.transport, market=self.market, db=db))
]
Expand Down

0 comments on commit b72358d

Please sign in to comment.