Commit 0c50b10

mo khan <mo@mokhan.ca>
2025-03-13 14:49:36
fix: append host to redirect location
1 parent 601de5a
Changed files (1)
bin
bin/ui
@@ -88,7 +88,11 @@ class UI
   end
 
   def redirect_to(location)
-    [302, { 'Location' => location }, []]
+    if location.start_with?("http")
+      [302, { 'Location' => location }, []]
+    else
+      [302, { 'Location' => "http://ui.example.com:8080#{location}" }, []]
+    end
   end
 
   def oauth_callback(request)