Created
August 27, 2016 03:21
-
-
Save nnsnodnb/636d723fd5381fb8b838c4fef20a3b3e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import route, run, HTTPResponse | |
@route('<url:path>') | |
def callback(url): | |
body = 'ただいまアクセスが集中しているため、サイトが繋がりづらい状態になっています。 ご迷惑をおかけして申し訳ありません。' | |
r = HTTPResponse(status=503, body=body) | |
r.set_header('Content-Type', 'document') | |
return r | |
if __name__ == '__main__': | |
run(host="0.0.0.0", port=5000, reloader=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment