[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: use x-forward-port in case base
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: use x-forward-port in case base url is not on standard port |
Date: |
Thu, 26 Oct 2023 20:24:55 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 4a007508 use x-forward-port in case base url is not on standard port
4a007508 is described below
commit 4a0075084de92d34b83a88b2bcd69568c7b2bf7e
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Oct 26 15:24:50 2023 -0300
use x-forward-port in case base url is not on standard port
---
src/backend/taler-merchant-httpd_helper.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/backend/taler-merchant-httpd_helper.c
b/src/backend/taler-merchant-httpd_helper.c
index 3e525245..2e06a432 100644
--- a/src/backend/taler-merchant-httpd_helper.c
+++ b/src/backend/taler-merchant-httpd_helper.c
@@ -742,6 +742,7 @@ TMH_base_url_by_connection (struct MHD_Connection
*connection,
{
const char *host;
const char *forwarded_host;
+ const char *forwarded_port;
const char *uri_path;
memset (buf,
@@ -773,6 +774,16 @@ TMH_base_url_by_connection (struct MHD_Connection
*connection,
GNUNET_buffer_write_str (buf,
host);
}
+ forwarded_port = MHD_lookup_connection_value (connection,
+ MHD_HEADER_KIND,
+ "X-Forwarded-Port");
+ if (NULL != forwarded_port)
+ {
+ GNUNET_buffer_write_str (buf,
+ ":");
+ GNUNET_buffer_write_str (buf,
+ forwarded_port);
+ }
uri_path = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
"X-Forwarded-Prefix");
@@ -799,6 +810,7 @@ TMH_taler_uri_by_connection (struct MHD_Connection
*connection,
{
const char *host;
const char *forwarded_host;
+ const char *forwarded_port;
const char *uri_path;
memset (buf,
@@ -810,6 +822,9 @@ TMH_taler_uri_by_connection (struct MHD_Connection
*connection,
forwarded_host = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
"X-Forwarded-Host");
+ forwarded_port = MHD_lookup_connection_value (connection,
+ MHD_HEADER_KIND,
+ "X-Forwarded-Port");
uri_path = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
"X-Forwarded-Prefix");
@@ -833,6 +848,13 @@ TMH_taler_uri_by_connection (struct MHD_Connection
*connection,
"/");
GNUNET_buffer_write_str (buf,
host);
+ if (NULL != forwarded_port)
+ {
+ GNUNET_buffer_write_str (buf,
+ ":");
+ GNUNET_buffer_write_str (buf,
+ forwarded_port);
+ }
if (NULL != uri_path)
GNUNET_buffer_write_path (buf,
uri_path);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: use x-forward-port in case base url is not on standard port,
gnunet <=