changeset 1202:3f791fbc1643

server: if "redirections" is not set, use "/login" page as default
author Goffi <goffi@goffi.org>
date Fri, 12 Jul 2019 14:58:11 +0200
parents f1f03b08e1f4
children 251eba911d4d
files libervia/common/constants.py libervia/server/server.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/common/constants.py	Wed Jul 10 08:32:49 2019 +0200
+++ b/libervia/common/constants.py	Fri Jul 12 14:58:11 2019 +0200
@@ -27,6 +27,7 @@
     #      as we use this version to check that there is not a mismatch with backend
     APP_VERSION = u"0.7.0D"  # Please add 'D' at the end for dev versions
     LIBERVIA_MAIN_PAGE = "libervia.html"
+    LIBERVIA_PAGE_START = "/login"
 
     # REGISTRATION
     # XXX: for now libervia forces the creation to lower case
--- a/libervia/server/server.py	Wed Jul 10 08:32:49 2019 +0200
+++ b/libervia/server/server.py	Fri Jul 12 14:58:11 2019 +0200
@@ -345,7 +345,7 @@
 
         # the default root URL, if not redirected
         if not "" in self.redirections:
-            self.redirections[""] = self._getRequestData(C.LIBERVIA_MAIN_PAGE)
+            self.redirections[""] = self._getRequestData(C.LIBERVIA_PAGE_START)
 
     def _setMenu(self, menus):
         menus = menus.get(self.site_name, [])