Fix reset file server port with config web interface
This commit is contained in:
parent
635c3b27cd
commit
ddbd5c7b19
5 changed files with 33 additions and 12 deletions
|
@ -49,6 +49,7 @@ class FileServer(ConnectionServer):
|
|||
raise Exception("Can't find bindable port")
|
||||
if not config.tor == "always":
|
||||
config.saveValue("fileserver_port", port) # Save random port value for next restart
|
||||
config.arguments.fileserver_port = port
|
||||
|
||||
ConnectionServer.__init__(self, ip, port, self.handleRequest)
|
||||
self.log.debug("Supported IP types: %s" % self.supported_ip_types)
|
||||
|
|
|
@ -1194,6 +1194,8 @@ class UiWebsocket(object):
|
|||
@flag.no_multiuser
|
||||
def actionConfigSet(self, to, key, value):
|
||||
import main
|
||||
|
||||
self.log.debug("Changing config %s value to %r" % (key, value))
|
||||
if key not in config.keys_api_change_allowed:
|
||||
self.response(to, {"error": "Forbidden: You cannot set this config key"})
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue