summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-06-04 23:40:28 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-06-04 23:40:28 +0200
commitc414fc3b1f5a70191cbb1fbd8c18d5f025cb9f7f (patch)
treea7f38d2ed0c8f34c6b03556125223ae2ffa3512f
parent00a231cdbebd15e4daf843d206bd6f7b6d69ff0a (diff)
render: redirect: Build relative URI.
-rw-r--r--mumi/web/render.scm10
1 files 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))