From c414fc3b1f5a70191cbb1fbd8c18d5f025cb9f7f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 4 Jun 2022 23:40:28 +0200 Subject: render: redirect: Build relative URI. --- mumi/web/render.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mumi/web/render.scm b/mumi/web/render.scm index 0b4b705..d34d607 100644 --- a/mumi/web/render.scm +++ b/mumi/web/render.scm @@ -120,12 +120,10 @@ "")) (define* (redirect path #:optional query (headers '())) - (let ((uri (build-uri 'http - #:host (%config 'host) - #:port (%config 'port) - #:path (string-append - "/" (encode-and-join-uri-path path)) - #:query query))) + (let ((uri (build-relative-ref + #:path (string-append + "/" (encode-and-join-uri-path path)) + #:query query))) (list (build-response #:code 301 #:headers (append `((content-type . (text/html)) -- cgit v1.2.3