aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/root.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-09-09 11:44:59 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 14:03:18 +0200
commitbeb163cfd15b93bf664b6a0590e114d4432e3ef9 (patch)
tree4a98def490dabb5f4df927a7a79504eb2ab66c9c /src/hydrilla/proxy/web_ui/root.py
parent45e5cf8dc3ca936e2db8e7e45689d0a3331aad43 (diff)
downloadhaketilo-hydrilla-beb163cfd15b93bf664b6a0590e114d4432e3ef9.tar.gz
haketilo-hydrilla-beb163cfd15b93bf664b6a0590e114d4432e3ef9.zip
[proxy] allow prompting the user when a package suitable for current site is found; add proxy's options page
This commit also causes uncached responses to be forced on all HTTP request to external servers. This is needed to make sure that changes Haketilo makes to HTTP response headers are always picked up by the browser. The drawback is that this increases network traffic causing a performance hit. We might optimize this in the future.
Diffstat (limited to 'src/hydrilla/proxy/web_ui/root.py')
-rw-r--r--src/hydrilla/proxy/web_ui/root.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hydrilla/proxy/web_ui/root.py b/src/hydrilla/proxy/web_ui/root.py
index ff7c1f7..855345e 100644
--- a/src/hydrilla/proxy/web_ui/root.py
+++ b/src/hydrilla/proxy/web_ui/root.py
@@ -44,6 +44,7 @@ from ...translations import translation as make_translation
from ... import item_infos
from .. import state as st
from .. import http_messages
+from . import options
from . import repos
from . import items
from . import prompts
@@ -89,10 +90,11 @@ class WebUIAppImpl(_app.WebUIApp):
self.jinja_env.globals['InstalledStatus'] = st.InstalledStatus
self.jinja_env.globals['ActiveStatus'] = st.ActiveStatus
self.jinja_env.globals['ItemType'] = item_infos.ItemType
+ self.jinja_env.globals['MappingUseMode'] = st.MappingUseMode
self.before_request(authenticate_by_referrer)
- for blueprint in [repos.bp, items.bp, prompts.bp]:
+ for blueprint in [repos.bp, items.bp, prompts.bp, options.bp]:
self.register_blueprint(blueprint)
# Flask app is not thread-safe and has to be accompanied by an ugly lock. This