Skip to content

Commit

Permalink
use 301 Moved Permanently to redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricporter committed May 13, 2014
1 parent 021368f commit 49b0fa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get(self, short_id):
key = util.gen_cache_key(const.CACHE_KEY_PREFIX.SHORT_ID, short_id)
url = yield tornado.gen.Task(c.get, key)
if url:
self.redirect(url)
self.redirect(url, permanent=True)
else:
raise HTTPError(404)

Expand Down Expand Up @@ -83,3 +83,4 @@ def post(self):
http_server = tornado.httpserver.HTTPServer(application, xheaders=True)
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()

0 comments on commit 49b0fa0

Please sign in to comment.