[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-bank] branch master updated: Defining decorator to add response h
From: |
gnunet |
Subject: |
[taler-bank] branch master updated: Defining decorator to add response header. |
Date: |
Thu, 08 Oct 2020 04:06:53 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new e87a7fa Defining decorator to add response header.
e87a7fa is described below
commit e87a7faa956d79b0ed933ef5a7eca0ecc6191966
Author: MS <ms@taler.net>
AuthorDate: Thu Oct 8 04:06:09 2020 +0200
Defining decorator to add response header.
---
talerbank/app/views.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index e218376..7b78582 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -69,6 +69,12 @@ LOGGER = logging.getLogger(__name__)
# can handle (because of the wallet).
UINT64_MAX = (2 ** 64) - 1
+def allow_origin_star(view_func):
+ def _decorator(request, *args, **kwargs):
+ response = view_func(request, *args, **kwargs)
+ response["Access-Control-Allow-Origin"] = "*"
+ return response
+ return wraps(view_func)(_decorator)
class PaytoParse:
def __init__(self, payto_uri):
@@ -641,7 +647,6 @@ def login_via_headers(view_func):
return view_func(request, user_account, *args, **kwargs)
return wraps(view_func)(_decorator)
-
##
# Build the DB query switch based on the "direction" history
# argument given by the user.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-bank] branch master updated: Defining decorator to add response header.,
gnunet <=