diff --git a/app.php b/app.php index b8d857d..1176bc4 100644 --- a/app.php +++ b/app.php @@ -29,7 +29,7 @@ if($f3->get('DISABLE_ORGANIZATION')) { $f3->route('GET /', function($f3) { - $f3->reroute('/signature'); + $f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature'); } ); $f3->route('GET /signature', @@ -199,7 +199,7 @@ $f3->route('POST /share', array_map('unlink', glob($tmpfile."*.svg")); } - $f3->reroute('/signature/'.$hash."#informations"); + $f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature/'.$hash."#informations"); } ); @@ -274,7 +274,7 @@ $f3->route('POST /signature/@hash/save', array_map('unlink', explode(' ', trim($svgFiles))); } - $f3->reroute('/signature/'.$f3->get('PARAMS.hash')."#signed"); + $f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature/'.$f3->get('PARAMS.hash')."#signed"); } ); diff --git a/config/config.ini.example b/config/config.ini.example index 50c6240..440b33c 100644 --- a/config/config.ini.example +++ b/config/config.ini.example @@ -12,3 +12,6 @@ PDF_STORAGE_PATH=/path/to/folder ; Metadata default fields ;METADATA_DEFAULT_FIELDS[metadata_key].type = "text" + +;Declare your public domain here if you can't handle location rewriting through your reverse proxy. +;REVERSE_PROXY_URL=http://127.0.0.1:8080 diff --git a/templates/metadata.html.php b/templates/metadata.html.php index c842ee1..66754a8 100644 --- a/templates/metadata.html.php +++ b/templates/metadata.html.php @@ -5,10 +5,10 @@ - - - " rel="stylesheet"> - + + + " rel="stylesheet"> +