gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] branch master updated: fix base URLs according to X-F


From: gnunet
Subject: [taler-deployment] branch master updated: fix base URLs according to X-Forwarded-*
Date: Wed, 01 Dec 2021 14:29:22 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new ee6f957  fix base URLs according to X-Forwarded-*
ee6f957 is described below

commit ee6f9578d38d3951513b7cbfe055349c30413257
Author: ms <ms@taler.net>
AuthorDate: Wed Dec 1 14:29:16 2021 +0100

    fix base URLs according to X-Forwarded-*
---
 bin/WIP/taler-local | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/bin/WIP/taler-local b/bin/WIP/taler-local
index bac4fb2..de82c0a 100755
--- a/bin/WIP/taler-local
+++ b/bin/WIP/taler-local
@@ -852,7 +852,6 @@ def prepare(x_forwarded_host, x_forwarded_proto):
         currency,
         rev_proxy_url,
         wire_method,
-        merchant_wire_address,
         exchange_wire_gateway_username,
         exchange_wire_gateway_password,
         frontend_api_key,
@@ -974,9 +973,6 @@ def prepare(x_forwarded_host, x_forwarded_proto):
         obj.cfg_put("auditordb-postgres", "config", "postgres:///taler")
         obj.cfg_put("exchange-account-1", "enable_debit", "yes")
         obj.cfg_put("exchange-account-1", "enable_credit", "yes")
-        obj.cfg_put("merchant-account-merchant", "payto_uri",
-            f"payto://{wire_method}/{rev_proxy_url + 
'/sandbox'}/{merchant_wire_address}"
-        )
         obj.cfg_put("merchant-account-merchant",
                     "wire_response",
                     "${TALER_DATA_HOME}/merchant/wire/merchant.json",
@@ -1062,15 +1058,17 @@ def prepare(x_forwarded_host, x_forwarded_proto):
         shutil.rmtree(CFG_OUTDIR)
     print(" OK")
 
+    def get_link(path = ""):
+       return x_forwarded_proto + "://" + x_forwarded_host + path
+
     print_nn("Generate preliminary taler.conf...")
     mc = config_main(
         "taler.conf",
         outdir=CFG_OUTDIR,
         unix_sockets_dir=UNIX_SOCKETS_DIR,
         currency=CURRENCY,
-        rev_proxy_url=REV_PROXY_URL,
+        rev_proxy_url=get_link(), # Gets X-Forwarded-* compatible base URL.
         wire_method=WIRE_METHOD,
-        merchant_wire_address=IBAN_MERCHANT_DEFAULT,
         exchange_wire_gateway_username=EXCHANGE_NEXUS_USERNAME,
         exchange_wire_gateway_password=EXCHANGE_NEXUS_PASSWORD,
         frontend_api_key=FRONTENDS_API_TOKEN,
@@ -1223,7 +1221,7 @@ def prepare(x_forwarded_host, x_forwarded_proto):
         unix_sockets_dir=UNIX_SOCKETS_DIR,
         currency=CURRENCY,
         api_key=FRONTENDS_API_TOKEN,
-        rev_proxy_url=REV_PROXY_URL
+        rev_proxy_url=get_link()
     )
     print(" OK")
     print_nn("Generating anastasis.conf...")
@@ -1232,7 +1230,7 @@ def prepare(x_forwarded_host, x_forwarded_proto):
         outdir=CFG_OUTDIR,
         unix_sockets_dir=UNIX_SOCKETS_DIR,
         currency=CURRENCY,
-        rev_proxy_url=REV_PROXY_URL,
+        rev_proxy_url=get_link(),
         api_key=FRONTENDS_API_TOKEN
     )
     print(" OK")
@@ -1487,13 +1485,11 @@ def prepare(x_forwarded_host, x_forwarded_proto):
     except Exception as error:
         fail(error)
     FACADE_URL=response.json().get("facades")[0].get("baseUrl")
-    def get_link(path):
-       return x_forwarded_proto + "://" + x_forwarded_host + path
     print_nn("Set suggested exchange at Sandbox...")
     Command([
         "libeufin-sandbox",
         "default-exchange",
-        get_link('/exchange/')
+        get_link('/exchange/'),
         EXCHANGE_PAYTO],
         env={
             "PATH": os.environ["PATH"],

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]