fix redirect after download when mounted at /slideshow via reverse proxy
This commit is contained in:
@@ -6,10 +6,12 @@ import threading
|
|||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
from flask import Flask, render_template, request, redirect, url_for, Response
|
from flask import Flask, render_template, request, redirect, url_for, Response
|
||||||
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
|
|
||||||
from db import init_db, search_images
|
from db import init_db, search_images
|
||||||
|
|
||||||
app = Flask(__name__, static_folder='Pictures', static_url_path='/pictures')
|
app = Flask(__name__, static_folder='Pictures', static_url_path='/pictures')
|
||||||
|
app.wsgi_app = ProxyFix(app.wsgi_app, x_prefix=1)
|
||||||
init_db()
|
init_db()
|
||||||
|
|
||||||
# job_id -> {'done': int, 'total': int, 'finished': bool, 'site': str, 'tags': str}
|
# job_id -> {'done': int, 'total': int, 'finished': bool, 'site': str, 'tags': str}
|
||||||
|
|||||||
Reference in New Issue
Block a user