Rev1913, Support local address other than 127.0.0.1
This commit is contained in:
parent
39734dfadb
commit
d57d82f439
6 changed files with 20 additions and 11 deletions
|
@ -408,7 +408,7 @@ class FileRequest(object):
|
|||
self.response({"ok": "Updated"})
|
||||
|
||||
def actionSiteReload(self, params):
|
||||
if self.connection.ip != "127.0.0.1" and self.connection.ip != config.ip_external:
|
||||
if self.connection.ip not in config.ip_local and self.connection.ip != config.ip_external:
|
||||
self.response({"error": "Only local host allowed"})
|
||||
|
||||
site = self.sites.get(params["site"])
|
||||
|
@ -419,7 +419,7 @@ class FileRequest(object):
|
|||
self.response({"ok": "Reloaded"})
|
||||
|
||||
def actionSitePublish(self, params):
|
||||
if self.connection.ip != "127.0.0.1" and self.connection.ip != config.ip_external:
|
||||
if self.connection.ip not in config.ip_local and self.connection.ip != config.ip_external:
|
||||
self.response({"error": "Only local host allowed"})
|
||||
|
||||
site = self.sites.get(params["site"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue