From f9aacb4c66072cb5c7beb9539c4849f022c403f9 Mon Sep 17 00:00:00 2001 From: Mayann Date: Wed, 10 May 2023 20:01:05 +0200 Subject: [PATCH 1/2] #136 Added environment variable APP_ROOT_PATH to expose the webapp behind a reverse proxy using subfolder. Minor changes to html pages to remove absolute path for some resources --- src/main/resources/application.properties | 3 ++- src/main/resources/templates/fragments/navbar.html | 12 ++++++------ src/main/resources/templates/multi-tool.html | 12 ++++++------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d374846f..e52ba67a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -17,8 +17,9 @@ server.error.include-exception=true server.error.include-message=always server.servlet.session.tracking-modes=cookie +server.servlet.context-path=${APP_ROOT_PATH:/} spring.devtools.restart.enabled=true spring.devtools.livereload.enabled=true -spring.thymeleaf.encoding=UTF-8 \ No newline at end of file +spring.thymeleaf.encoding=UTF-8 diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index d21868cf..82813598 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -304,19 +304,19 @@ function compareVersions(version1, version2) { @@ -324,7 +324,7 @@ function compareVersions(version1, version2) { diff --git a/src/main/resources/templates/multi-tool.html b/src/main/resources/templates/multi-tool.html index 2c6944b0..fc309162 100644 --- a/src/main/resources/templates/multi-tool.html +++ b/src/main/resources/templates/multi-tool.html @@ -60,11 +60,11 @@