Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Better handling of context and allow Lift apps to have context modified on a session-by-session basis #68

dpp opened this Issue · 5 comments

5 participants


Support for changing the context root for requests so the root can be blank even if the actual context path is not or that a context path can be added (and all requests will be rewritten removing that context path from the head of the path) or subtracted.


Updating tickets (#68, #95, #257, #287, #312, #326)


I'm currently replacing net.liftweb.http.Req.fixHref in boot in order to work around a similar issue (removing both context root and one level of template subdirectory, for multiple subdomains on a single lift app). Basically, our boot looks like

 def boot {
    net.liftweb.http.Req.fixHref = fixHref _
  private def fixHref(contextPath: String, v: Seq[Node], fixURL: Boolean, rewrite: Box[String => String]): Text = {
    val s = v.text
    Text(if (s.startsWith("http")) s else customLink(s, false).openOr(Text("/")).toString)

where customLink does potentially arbitrary munging on a per-request basis, in our case using headers from the frontend proxy to figure out which subdomain is being accessed and generate relative or absolute links appropriately.

I'd ask that the solution for this ticket either leave Req.fixHref publicly accessible, or replace it with a similarly flexible alternative.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.