From f04e30d81d3d805c792be6483fef39d209597c7c Mon Sep 17 00:00:00 2001 From: Tangui Morlier Date: Mon, 4 Sep 2023 16:47:10 +0200 Subject: [PATCH] =?UTF-8?q?Configuration=20pour=20les=20configurations=20d?= =?UTF-8?q?e=20reverse=20proxies=20qui=20ne=20g=C3=A8rent=20pas=20la=20r?= =?UTF-8?q?=C3=A9=C3=A9criture=20de=20l'ent=C3=AAte=20de=20Location?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.php | 6 +++--- config/config.ini.example | 3 +++ templates/metadata.html.php | 22 +++++++++---------- templates/organization.html.php | 24 ++++++++++----------- templates/signature.html.php | 38 ++++++++++++++++----------------- 5 files changed, 48 insertions(+), 45 deletions(-) diff --git a/app.php b/app.php index b8d857d..1176bc4 100644 --- a/app.php +++ b/app.php @@ -29,7 +29,7 @@ $f3->route('GET /', function($f3) { - $f3->reroute('/signature'); + $f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature'); } ); $f3->route('GET /signature', @@ -199,7 +199,7 @@ function($f3) { 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 @@ function($f3) { 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"> + Édition des métadonnées d'un PDF @@ -21,13 +21,13 @@
@@ -96,12 +96,12 @@ - - - + + + - + diff --git a/templates/organization.html.php b/templates/organization.html.php index 0eef40a..f6bb2f0 100644 --- a/templates/organization.html.php +++ b/templates/organization.html.php @@ -5,10 +5,10 @@ - - - " rel="stylesheet"> - + + + " rel="stylesheet"> + Organiser un PDF @@ -21,13 +21,13 @@
@@ -61,7 +61,7 @@
- +
Organisation de PDF
@@ -88,7 +88,7 @@
-
+
@@ -152,11 +152,11 @@ - - + + - + diff --git a/templates/signature.html.php b/templates/signature.html.php index d07ab06..4f492be 100644 --- a/templates/signature.html.php +++ b/templates/signature.html.php @@ -5,9 +5,9 @@ - - - " rel="stylesheet"> + + + " rel="stylesheet"> Signature PDF @@ -20,13 +20,13 @@ @@ -64,7 +64,7 @@
- +
Signature du PDF
@@ -108,7 +108,7 @@ - + @@ -119,10 +119,10 @@

Vous êtes 0 à avoir signé ce PDF

- + @@ -177,7 +177,7 @@
-
+
@@ -206,7 +206,7 @@

Le PDF sera conservé après la dernière signature.

@@ -263,11 +263,11 @@ - - - - - + + + + + - +