[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-survey] branch master updated (6f053b8 -> 6b033f2)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-survey] branch master updated (6f053b8 -> 6b033f2) |
Date: |
Mon, 29 Jan 2018 23:36:06 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a change to branch master
in repository survey.
from 6f053b8 don't specify (wrong!) pickup URL
new 2a0e362 apikey
new 6b033f2 remove comment
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
talersurvey/survey/survey.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/talersurvey/survey/survey.py b/talersurvey/survey/survey.py
index ca1695c..c5b796c 100644
--- a/talersurvey/survey/survey.py
+++ b/talersurvey/survey/survey.py
@@ -31,6 +31,7 @@ app.secret_key =
base64.b64encode(os.urandom(64)).decode('utf-8')
TC = TalerConfig.from_env()
BACKEND_URL = TC["frontends"]["backend"].value_string(required=True)
CURRENCY = TC["taler"]["currency"].value_string(required=True)
+APIKEY = TC["frontends"]["backend_apikey"].value_string(required=True)
app.config.from_object(__name__)
LOGGER = logging.getLogger(__name__)
@@ -59,8 +60,9 @@ def err_abort(abort_status_code, **params):
def backend_post(endpoint, json):
+ headers = {"Authorization": "ApiKey " + APIKEY}
try:
- resp = requests.post(urljoin(BACKEND_URL, endpoint), json=json)
+ resp = requests.post(urljoin(BACKEND_URL, endpoint), json=json,
headers=headers)
except requests.ConnectionError:
err_abort(500, message="Could not establish connection to backend")
try:
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-survey] branch master updated (6f053b8 -> 6b033f2),
gnunet <=