From 3795de97a4cc6110fad4f54f3204785e1118f85b Mon Sep 17 00:00:00 2001 From: Damian Bronecki Date: Mon, 1 May 2017 22:18:12 +0200 Subject: [PATCH] Fix redirect issue by partially reverting to 956af54 - fixes #1567 --- .../scala/gitbucket/core/controller/ControllerBase.scala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/scala/gitbucket/core/controller/ControllerBase.scala b/src/main/scala/gitbucket/core/controller/ControllerBase.scala index de80f9774..d79d86d1d 100644 --- a/src/main/scala/gitbucket/core/controller/ControllerBase.scala +++ b/src/main/scala/gitbucket/core/controller/ControllerBase.scala @@ -147,6 +147,13 @@ abstract class ControllerBase extends ScalatraFilter } } + override def url(path: String, params: Iterable[(String, Any)] = Iterable.empty, + includeContextPath: Boolean = true, includeServletPath: Boolean = true, + absolutize: Boolean = true, withSessionId: Boolean = true) + (implicit request: HttpServletRequest, response: HttpServletResponse): String = + if (path.startsWith("http")) path + else baseUrl + super.url(path, params, false, false, false) + /** * Extends scalatra-form's trim rule to eliminate CR and LF. */