diff options
author | Sebastian <sebasjm@gmail.com> | 2022-07-01 19:05:12 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-07-01 19:05:32 -0300 |
commit | 3408486b5ba1752e589bec2ba592dcdb638c8be9 (patch) | |
tree | 1f28e0fa898aa5f7b60f2fc8f926d2e70411f8d9 /src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c | |
parent | a3a854aedfb356782dfebfa039ebbf3158cf7161 (diff) | |
download | merchant-3408486b5ba1752e589bec2ba592dcdb638c8be9.tar.gz merchant-3408486b5ba1752e589bec2ba592dcdb638c8be9.tar.bz2 merchant-3408486b5ba1752e589bec2ba592dcdb638c8be9.zip |
Revert "check X-Forwarded-Proto when constructing an URI, useful behind a reverse proxy"
This reverts commit a3a854aedfb356782dfebfa039ebbf3158cf7161.
This check is already done in TALER_mhd_is_https in the exchange repo
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c index 8bd5b64f..3953fa06 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c +++ b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c @@ -84,8 +84,6 @@ make_taler_refund_uri (struct MHD_Connection *connection, { const char *host; const char *forwarded_host; - const char *forwarded_proto; - bool proxy_says_https; const char *uri_path; struct GNUNET_Buffer buf = { 0 }; @@ -97,13 +95,6 @@ make_taler_refund_uri (struct MHD_Connection *connection, forwarded_host = MHD_lookup_connection_value (connection, MHD_HEADER_KIND, "X-Forwarded-Host"); - forwarded_proto = MHD_lookup_connection_value (connection, - MHD_HEADER_KIND, - "X-Forwarded-Proto"); - proxy_says_https = ( (NULL != forwarded_proto) && - (0 == strcmp ("https", - forwarded_proto))) - uri_path = MHD_lookup_connection_value (connection, MHD_HEADER_KIND, "X-Forwarded-Prefix"); @@ -116,13 +107,8 @@ make_taler_refund_uri (struct MHD_Connection *connection, return NULL; } GNUNET_buffer_write_str (&buf, "taler"); - - if (GNUNET_NO == TALER_mhd_is_https (connection) && - ! proxy_says_https) - { - GNUNET_buffer_write_str (&buf, - "+http"); - } + if (GNUNET_NO == TALER_mhd_is_https (connection)) + GNUNET_buffer_write_str (&buf, "+http"); GNUNET_buffer_write_str (&buf, "://refund/"); GNUNET_buffer_write_str (&buf, host); if (NULL != uri_path) |