fdfd
This commit is contained in:
parent
5751893620
commit
b765455299
2 changed files with 5 additions and 1 deletions
|
@ -37,7 +37,7 @@ app.config['DATABASE_URL'] = environ.get("DATABASE_CONNECTION_POOL_URL",environ.
|
||||||
|
|
||||||
app.config['SECRET_KEY'] = environ.get('MASTER_KEY')
|
app.config['SECRET_KEY'] = environ.get('MASTER_KEY')
|
||||||
app.config["SERVER_NAME"] = environ.get("DOMAIN").strip()
|
app.config["SERVER_NAME"] = environ.get("DOMAIN").strip()
|
||||||
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 86400
|
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 1
|
||||||
|
|
||||||
app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower()
|
app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower()
|
||||||
app.config["VERSION"] = "1.0.0"
|
app.config["VERSION"] = "1.0.0"
|
||||||
|
|
|
@ -135,6 +135,10 @@ def archives(path):
|
||||||
def static_service(path):
|
def static_service(path):
|
||||||
resp = make_response(send_from_directory('./assets', path))
|
resp = make_response(send_from_directory('./assets', path))
|
||||||
if request.path.endswith('.css'): resp.headers.add("Content-Type", "text/css")
|
if request.path.endswith('.css'): resp.headers.add("Content-Type", "text/css")
|
||||||
|
if request.path.endswith('.gif') or request.path.endswith('.ttf') or request.path.endswith('.woff') or request.path.endswith('.woff2'):
|
||||||
|
resp.headers.remove("Cache-Control")
|
||||||
|
resp.headers.add("Cache-Control", "public, max-age=31556952")
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
@app.get("/robots.txt")
|
@app.get("/robots.txt")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue