Fix: ui_restrict now working with ui_password

https://github.com/HelloZeroNet/ZeroNet/issues/207
This commit is contained in:
Sergei Bondarenko 2017-08-18 22:42:14 +03:00 committed by GitHub
parent d44f08382a
commit d591df39cc
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ class UiRequestPlugin(object):
last_cleanup = time.time()
def route(self, path):
# Restict Ui access by ip
if config.ui_restrict and self.env['REMOTE_ADDR'] not in config.ui_restrict:
return self.error403(details=False)
if path.endswith("favicon.ico"):
return self.actionFile("src/Ui/media/img/favicon.ico")
else: