mirror of
https://github.com/moparisthebest/HttpUploadComponent
synced 2024-11-22 00:42:21 -05:00
Make HTTP address configurable
This commit is contained in:
parent
4dde390ae5
commit
f8bc7c6242
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
# https://github.com/github/gitignor
|
# https://github.com/github/gitignore
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
@ -6,6 +6,7 @@ whitelist:
|
|||||||
- siacs.eu
|
- siacs.eu
|
||||||
- gultsch.de
|
- gultsch.de
|
||||||
max_file_size: 20971520 #20MiB
|
max_file_size: 20971520 #20MiB
|
||||||
|
http_address: 127.0.0.1
|
||||||
http_port: 8080
|
http_port: 8080
|
||||||
get_url : http://upload.siacs.eu:8080
|
get_url : http://upload.siacs.eu:8080
|
||||||
put_url : http://upload.siacs.eu:8080
|
put_url : http://upload.siacs.eu:8080
|
||||||
|
@ -181,7 +181,7 @@ if __name__ == "__main__":
|
|||||||
logging.basicConfig(level=LOGLEVEL,
|
logging.basicConfig(level=LOGLEVEL,
|
||||||
format='%(asctime)-24s %(levelname)-8s %(message)s',
|
format='%(asctime)-24s %(levelname)-8s %(message)s',
|
||||||
filename=args.logfile)
|
filename=args.logfile)
|
||||||
server = ThreadedHTTPServer(('0.0.0.0', config['http_port']), HttpHandler)
|
server = ThreadedHTTPServer((config['http_address'], config['http_port']), HttpHandler)
|
||||||
if 'keyfile' in config and 'certfile' in config:
|
if 'keyfile' in config and 'certfile' in config:
|
||||||
server.socket = ssl.wrap_socket(server.socket, keyfile=config['keyfile'], certfile=config['certfile'])
|
server.socket = ssl.wrap_socket(server.socket, keyfile=config['keyfile'], certfile=config['certfile'])
|
||||||
xmpp = MissingComponent(config['jid'],config['secret'])
|
xmpp = MissingComponent(config['jid'],config['secret'])
|
||||||
|
Loading…
Reference in New Issue
Block a user