-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
app.py
32 lines (24 loc) · 823 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
This is a simple cheatsheet webapp.
"""
import os
from flask import Flask, send_from_directory
from flask_sslify import SSLify
DIR = os.path.dirname(os.path.realpath(__file__))
ROOT = os.path.join(DIR, 'docs', '_build', 'html')
app = Flask(__name__)
#if 'DYNO' in os.environ:
# sslify = SSLify(app)
@app.route('/<path:path>')
def static_proxy(path):
"""Static files proxy"""
return send_from_directory(ROOT, path)
@app.route('/')
def index_redirection():
"""Redirecting index file"""
return send_from_directory(ROOT, 'index.html')
@app.route('/.well-known/acme-challenge/vuLDuBTExCes4W2oxhGr9ZAl255JaQ3M-sskGhc5kP8')
def letsencrypt():
return "vuLDuBTExCes4W2oxhGr9ZAl255JaQ3M-sskGhc5kP8.1MQ2tN97oDMCS6VnIiDMXAjUQwpiEoyNT2mUiGLhR7o"
if __name__ == "__main__":
app.run(debug=True)