Skip to content

Commit

Permalink
Fix determining context path
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangmm committed Mar 28, 2023
1 parent 88128bc commit 61b4476
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions modules/config.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,15 @@ return
declare variable $config:context-path :=
let $prop := util:system-property("teipublisher.context-path")
return
if (not(empty($prop)) and $prop != "auto")
then ($prop)
else if(not(empty(request:get-header("X-Forwarded-Host"))))
then ("")
else (
if (exists($prop)) then
if ($prop = "auto") then
request:get-context-path() || substring-after($config:app-root, "/db")
else
$prop
else if (exists(request:get-header("X-Forwarded-Host")))
then ""
else
request:get-context-path() || substring-after($config:app-root, "/db")
)
;

declare variable $config:data-root :=$config:app-root || "/data";
Expand Down

0 comments on commit 61b4476

Please sign in to comment.