From 36b48fd03fd9593936b88ebcca827e77cb790bf1 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 4 Mar 2024 07:29:51 +0300 Subject: Pass on the request scheme to GN2 app This is useful to enable building URIs with the correct scheme in the application. These URIs are important when redirection to and from external services such as the gn-auth service. --- genenetwork-development.scm | 3 ++- genenetwork/services/genenetwork.scm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 82e202a..8139635 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -1000,7 +1000,8 @@ GeneNetwork2 and GeneNetwork3 are listening on." (uri "/") (body (list (string-append "proxy_pass http://localhost:" (number->string gn2-port) ";") - "proxy_set_header Host $host;"))) + "proxy_set_header Host $host;" + "proxy_set_header X-Forwarded-Proto $scheme;"))) (nginx-location-configuration ;; Reverse proxy genenetwork3. (uri "/api3") diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm index 2c53bfb..f37a078 100644 --- a/genenetwork/services/genenetwork.scm +++ b/genenetwork/services/genenetwork.scm @@ -303,7 +303,8 @@ a @code{} record." (uri "/") (body (list (string-append "proxy_pass http://localhost:" (number->string gn2-port) ";") - "proxy_set_header Host $host;"))) + "proxy_set_header Host $host;" + "proxy_set_header X-Forwarded-Proto $scheme;"))) (nginx-location-configuration (uri "/api3/") (body (list "rewrite /api3/(.*) /api/$1 break;" -- cgit v1.2.3