chore: update Gunicorn bind address to 0.0.0.0 and disable browser caching for dynamic routes
This commit is contained in:
parent
b99755771e
commit
6eb7e72dca
@ -7,7 +7,7 @@ module.exports = {
|
|||||||
args: [
|
args: [
|
||||||
'--workers', '1',
|
'--workers', '1',
|
||||||
'--threads', '4',
|
'--threads', '4',
|
||||||
'--bind', '127.0.0.1:5000',
|
'--bind', '0.0.0.0:5000',
|
||||||
'--timeout', '300', // long timeout for backup operations
|
'--timeout', '300', // long timeout for backup operations
|
||||||
'--keep-alive', '5',
|
'--keep-alive', '5',
|
||||||
'--log-level', 'info',
|
'--log-level', 'info',
|
||||||
|
|||||||
10
gui_app.py
10
gui_app.py
@ -1255,6 +1255,16 @@ def startswith_filter(value, prefix):
|
|||||||
return str(value).startswith(prefix)
|
return str(value).startswith(prefix)
|
||||||
|
|
||||||
|
|
||||||
|
@app.after_request
|
||||||
|
def add_header(r):
|
||||||
|
"""Prevent caching of dynamic pages by the browser."""
|
||||||
|
if not request.path.startswith('/static/'):
|
||||||
|
r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
|
||||||
|
r.headers["Pragma"] = "no-cache"
|
||||||
|
r.headers["Expires"] = "0"
|
||||||
|
return r
|
||||||
|
|
||||||
|
|
||||||
# ── NFS Management Routes ─────────────────────────────────────────────────────────
|
# ── NFS Management Routes ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@app.route('/nfs')
|
@app.route('/nfs')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user