[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: fix for #8369
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: fix for #8369 |
Date: |
Wed, 06 Mar 2024 23:26:15 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new cd470083 fix for #8369
cd470083 is described below
commit cd4700838971f1bb40899e555f3d0d244c873ca8
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Mar 6 23:26:12 2024 +0100
fix for #8369
---
src/exchange/taler-exchange-httpd.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd.c
b/src/exchange/taler-exchange-httpd.c
index 59ec9634..36459fbd 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -164,6 +164,11 @@ struct TALER_Amount TEH_stefan_log;
*/
float TEH_stefan_lin;
+/**
+ * Where to redirect users from "/"?
+ */
+static char *toplevel_redirect_url;
+
/**
* Our currency.
*/
@@ -1503,15 +1508,15 @@ handle_post_auditors (struct TEH_RequestContext *rc,
/**
* Generates the response for "/", redirecting the
- * client to the "/webui/" from where we serve the SPA.
+ * client to the ``toplevel_redirect_url``.
*
* @param rc request context
* @param args remaining arguments (should be empty)
* @return MHD result code
*/
static MHD_RESULT
-spa_redirect (struct TEH_RequestContext *rc,
- const char *const args[])
+toplevel_redirect (struct TEH_RequestContext *rc,
+ const char *const args[])
{
const char *text = "Redirecting to /webui/";
struct MHD_Response *response;
@@ -1532,7 +1537,7 @@ spa_redirect (struct TEH_RequestContext *rc,
if (MHD_NO ==
MHD_add_response_header (response,
MHD_HTTP_HEADER_LOCATION,
- "/webui/"))
+ toplevel_redirect_url))
{
GNUNET_break (0);
MHD_destroy_response (response);
@@ -1584,11 +1589,11 @@ handle_mhd_request (void *cls,
.data = "User-agent: *\nDisallow: /\n",
.response_code = MHD_HTTP_OK
},
- /* Landing page, redirect to SPA */
+ /* Landing page, redirect to toplevel_redirect_url */
{
.url = "",
.method = MHD_HTTP_METHOD_GET,
- .handler.get = &spa_redirect
+ .handler.get = &toplevel_redirect
},
/* AGPL licensing page, redirect to source. As per the AGPL-license, every
deployment is required to offer the user a download of the source of
@@ -2110,6 +2115,14 @@ exchange_serve_process_config (void)
"KYC_AML_TRIGGER");
return GNUNET_SYSERR;
}
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (TEH_cfg,
+ "exchange",
+ "TOPLEVEL_REDIRECT_URL",
+ &toplevel_redirect_url))
+ {
+ toplevel_redirect_url = GNUNET_strdup ("/terms");
+ }
if (GNUNET_OK !=
TALER_config_get_currency (TEH_cfg,
&TEH_currency))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: fix for #8369,
gnunet <=