aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newspipe/bootstrap.py12
-rw-r--r--newspipe/lib/utils.py1
2 files changed, 3 insertions, 10 deletions
diff --git a/newspipe/bootstrap.py b/newspipe/bootstrap.py
index 3ca573b1..1c5c967d 100644
--- a/newspipe/bootstrap.py
+++ b/newspipe/bootstrap.py
@@ -5,7 +5,6 @@ import os
from flask import Flask
from flask import request
-from flask import url_for as f_url_for
from flask_babel import Babel
from flask_babel import format_datetime
from flask_migrate import Migrate
@@ -74,8 +73,8 @@ set_logging(application.config["LOG_PATH"])
_prefix = ""
if "PREFIX" in application.config:
- application.wsgi_app = ReverseProxied(application.wsgi_app, script_name=application.config["PREFIX"])
- _prefix = application.config["PREFIX"]
+ application.wsgi_app = ReverseProxied(application.wsgi_app, script_name=application.config["PREFIX"])
+ _prefix = application.config["PREFIX"]
db = SQLAlchemy(application)
@@ -117,13 +116,6 @@ application.jinja_env.globals["application"] = application
@application.context_processor
def utility_processor():
- #def url_for(endpoint, **values):
- # """ Custom reverse-proxy support for url_for """
- # _uf = f_url_for(endpoint, **values)
- # #if prefix:
- # # _uf = str(prefix) + _uf
- # print(f"DEBUG: generating url_for {endpoint}, of {_uf}")
- # return _uf
def prefix():
return _prefix.rstrip("/")
return dict(prefix=prefix)
diff --git a/newspipe/lib/utils.py b/newspipe/lib/utils.py
index 7e8e4a15..e839d99c 100644
--- a/newspipe/lib/utils.py
+++ b/newspipe/lib/utils.py
@@ -6,6 +6,7 @@ from hashlib import md5
import requests
from flask import request
+from flask import url_for
from newspipe.bootstrap import application
bgstack15