]> www.vanbest.org Git - motioneye-debian/commitdiff
add server_name config option #657
authorhobbyquaker <bastiraff@googlemail.com>
Wed, 28 Mar 2018 18:20:08 +0000 (20:20 +0200)
committerhobbyquaker <bastiraff@googlemail.com>
Wed, 28 Mar 2018 18:20:08 +0000 (20:20 +0200)
extra/motioneye.conf.sample
motioneye/handlers.py
motioneye/settings.py

index 5a90428c90f497043c57facf6f5d2994287b2e8c..9bbb751d415f8f5ce69eb1c9123cb33b5a0d4e06 100644 (file)
@@ -92,3 +92,6 @@ add_remove_cameras true
 
 # enables HTTP basic authentication scheme (in addition to, not instead of the signature mechanism)
 http_basic_auth false
+
+# overrides the hostname (useful if motionEye runs behind a reverse proxy)
+# server_name motionEye
index 4fe9125f47fb925ceb27bf54b9c0967c23cb5ab5..6cc14cdd3f464f903239dc8c1417e3feac3bcd58 100644 (file)
@@ -244,7 +244,7 @@ class MainHandler(BaseHandler):
                     add_remove_cameras=settings.ADD_REMOVE_CAMERAS,
                     main_sections=main_sections,
                     camera_sections=camera_sections,
-                    hostname=socket.gethostname(),
+                    hostname=settings.SERVER_NAME,
                     title=self.get_argument('title', None),
                     admin_username=config.get_main().get('@admin_username'),
                     has_streaming_auth=motionctl.has_streaming_auth(),
index 999c6b8fba71243fdcf06b587d624551b9d2d492..a25a0038539e7074c6b3cce9b733fc478db4b139 100644 (file)
@@ -2,6 +2,7 @@
 import logging
 import os.path
 import sys
+import socket
 
 import motioneye
 
@@ -131,3 +132,6 @@ PASSWORD_HOOK = None
 
 # enables HTTP basic authentication scheme (in addition to, not instead of the signature mechanism)
 HTTP_BASIC_AUTH = False
+
+# provides the possibility to override the hostname
+SERVER_NAME = socket.gethostname()