summaryrefslogtreecommitdiff
path: root/talermerchantdemos/httpcommon/__init__.py
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-09-07 15:18:00 +0200
committerChristian Grothoff <christian@grothoff.org>2022-09-07 15:18:00 +0200
commitf794a4eea4853aba015dfa2efa6b75a806c84b22 (patch)
tree27f8bd6ae0c7438caf4bcac5ca12e11c7dbd89e1 /talermerchantdemos/httpcommon/__init__.py
parentf2ea1b9d5ba4dd3720417a2fdbccc03c06506efd (diff)
downloadtaler-merchant-demos-f794a4eea4853aba015dfa2efa6b75a806c84b22.tar.gz
taler-merchant-demos-f794a4eea4853aba015dfa2efa6b75a806c84b22.tar.bz2
taler-merchant-demos-f794a4eea4853aba015dfa2efa6b75a806c84b22.zip
-try with url_for
Diffstat (limited to 'talermerchantdemos/httpcommon/__init__.py')
-rw-r--r--talermerchantdemos/httpcommon/__init__.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/talermerchantdemos/httpcommon/__init__.py b/talermerchantdemos/httpcommon/__init__.py
index cddc96a..e5b970c 100644
--- a/talermerchantdemos/httpcommon/__init__.py
+++ b/talermerchantdemos/httpcommon/__init__.py
@@ -1,7 +1,7 @@
import flask
import requests
from urllib.parse import urljoin
-from flask import request
+from flask import request, url_for
from datetime import datetime
import time
from flask_babel import gettext
@@ -195,11 +195,7 @@ def make_utility_processor(pagename):
getlang=getlang,
all_languages=all_languages,
static=static,
- script_name=get_app_root(),
+ script_name=url_for('index'),
)
return utility_processor
-
-# Ask the env the value of X-Forwarded-Prefix.
-def get_app_root():
- return flask.request.environ.get("SCRIPT_NAME", "")