From 8de06a0a8aa59e77c5da8725c57b88b8d57daae1 Mon Sep 17 00:00:00 2001 From: baldo Date: Sat, 6 May 2017 18:40:59 +0200 Subject: [PATCH] Allow serving everything beneath a baseUrl with a path. See: https://github.com/freifunkhamburg/ffffng/issues/44 --- README.md | 2 +- admin/index.html | 2 +- admin/js/main.js | 10 +++-- admin/js/views/dashboardStats.js | 6 ++- admin/js/views/mailActionButton.js | 6 ++- admin/js/views/taskActionButton.js | 6 ++- admin/js/views/version.js | 6 ++- app/scripts/directives/footer.js | 6 ++- app/scripts/services/monitoringService.js | 8 ++-- app/scripts/services/nodeService.js | 12 +++--- server/app.js | 17 +++++--- server/config.js | 4 ++ server/logger.js | 3 +- server/router.js | 52 +++++++++++++---------- 14 files changed, 85 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index 4d36909..4e2b8b3 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ cp $FFFFNG_HOME/node_modules/ffffng/config.json.example $FFFFNG_HOME/config.json Dann die `config.json` anpassen nach belieben. Es gibt die folgenden Konfigurations-Optionen: * **`server.baseUrl`** Basis-URL unter der die Knotenverwaltung erreichbar ist, z. B.: - `"https://formular.musterstadt.freifunk.net"` + `"https://formular.musterstadt.freifunk.net"` oder `"https://musterstadt.freifunk.net/formular"` * **`server.port`** Port unter dem der Server lokal läuft, z. B.: `8080` * **`server.databaseFile`** Pfad zur Datenbank-Datei, z. B.: `"$FFFFNG_HOME/ffffng.sqlite"` diff --git a/admin/index.html b/admin/index.html index 8b6a187..f2e9ed2 100644 --- a/admin/index.html +++ b/admin/index.html @@ -80,6 +80,6 @@ - + diff --git a/admin/js/main.js b/admin/js/main.js index 38b6647..b0a157a 100644 --- a/admin/js/main.js +++ b/admin/js/main.js @@ -40,6 +40,8 @@ angular.module('ffffngAdmin').config(function(NgAdminConfigurationProvider, Rest var admin = nga.application(title); document.title = title; + var pathPrefix = config.rootPath === '/' ? '' : config.rootPath; + admin .header( '