From 984485d9cbcf42c9a76dd1727f84ae2769322b58 Mon Sep 17 00:00:00 2001 From: The Stranjer <791672+TheStranjer@users.noreply.github.com> Date: Wed, 18 Dec 2019 18:34:03 -0500 Subject: [PATCH] Actually send file contents when using FHOST_USE_X_ACCEL_REDIRECT --- fhost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fhost.py b/fhost.py index 72363a6..e4c7865 100755 --- a/fhost.py +++ b/fhost.py @@ -282,7 +282,7 @@ def get(path): fsize = os.path.getsize(fpath) if app.config["FHOST_USE_X_ACCEL_REDIRECT"]: - response = make_response() + response = make_response(open(fpath, "r").read(), 200) response.headers["Content-Type"] = f.mime response.headers["Content-Length"] = fsize response.headers["X-Accel-Redirect"] = "/" + fpath