Add fileserver default cache timeout for downloaded files

This commit is contained in:
allegroai
2020-06-21 23:55:52 +03:00
parent 27352c5cb6
commit 82be1840b0
3 changed files with 33 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ CORS(app, **config.get("fileserver.cors"))
Compress(app)
app.config["UPLOAD_FOLDER"] = os.environ.get("TRAINS_UPLOAD_FOLDER") or DEFAULT_UPLOAD_FOLDER
app.config["SEND_FILE_MAX_AGE_DEFAULT"] = config.get("fileserver.download.cache_timeout_sec", 5 * 60)
@app.route("/", methods=["POST"])