Skip to content

Instantly share code, notes, and snippets.

@v3ss0n
Created March 11, 2017 19:02
Show Gist options
  • Save v3ss0n/aa8020d96b107b6864caf9c1074e9f99 to your computer and use it in GitHub Desktop.
Save v3ss0n/aa8020d96b107b6864caf9c1074e9f99 to your computer and use it in GitHub Desktop.
class AppStaticHandler(StaticFileHandler):
def write_error(self, status_code, **kwargs):
errors = [403, 404, 500, 503]
# FIXME: logging.info("status_code: %s" % status_code)
if status_code in [404]:
# self.set_status(200)
with open("./dist/index.html") as f:
self.write(f.read())
else:
self.write("Unknown Error %s" % status_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment