Dynamically configure cookie and base-url

When `base-url` is the default (i.e. localhost), the cookie is now
configured with the domain doing the request and the webapp is
configured to run requests against the host in the address bar of the
browser.
This commit is contained in:
Eike Kettner
2020-09-13 12:29:39 +02:00
parent 7104323e7e
commit d8bb6dcba3
4 changed files with 26 additions and 13 deletions

View File

@ -83,6 +83,9 @@ case class LenientUri(
}
)
def isLocal: Boolean =
host.exists(_.equalsIgnoreCase("localhost"))
def asString: String = {
val schemePart = scheme.toList.mkString(":")
val authPart = authority.map(a => s"//$a").getOrElse("")