|
@@ -17,6 +17,15 @@ app.config.from_object(
|
|
|
)
|
|
|
cache = Cache(app, config={"CACHE_TYPE": "SimpleCache"})
|
|
|
|
|
|
+app.config['SESSION_COOKIE_SECURE'] = True # Only send cookie over HTTPS
|
|
|
+app.config['SESSION_COOKIE_HTTPONLY'] = True # Prevent JavaScript access
|
|
|
+app.config['SESSION_COOKIE_SAMESITE'] = 'Lax' # Adjust for cross-site requests
|
|
|
+app.config['PERMANENT_SESSION_LIFETIME'] = 60 * 60 * 24 * 365 # 1 year in seconds
|
|
|
+
|
|
|
+@app.before_request
|
|
|
+def make_session_permanent():
|
|
|
+ session.permanent = True
|
|
|
+
|
|
|
@app.route('/manifest.json')
|
|
|
def serve_manifest():
|
|
|
return send_file('manifest.json', mimetype='application/manifest+json')
|