mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
https can be disabled
This commit is contained in:
parent
bcc4f22cf5
commit
e6c759e476
@ -2,11 +2,14 @@
|
|||||||
documentPath=demo.ncdb
|
documentPath=demo.ncdb
|
||||||
|
|
||||||
[Security]
|
[Security]
|
||||||
# run python generate-secret-key.py and paste the result below
|
# run "python generate-secret-key.py" and paste the result below
|
||||||
flaskSecretKey=
|
flaskSecretKey=
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
port=5000
|
port=5000
|
||||||
|
# true for TLS/SSL/HTTPS (secure), false for HTTP (unsecure).
|
||||||
|
https=true
|
||||||
|
# path to certificate (run "bash generate-cert.sh" to generate self-signed certificate). Relevant only if https=true
|
||||||
certPath=cert.crt
|
certPath=cert.crt
|
||||||
certKeyPath=cert.key
|
certKeyPath=cert.key
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ user = User()
|
|||||||
user.id = config['Login']['username']
|
user.id = config['Login']['username']
|
||||||
|
|
||||||
port = config['Network']['port']
|
port = config['Network']['port']
|
||||||
|
https = config['Network']['https']
|
||||||
certPath = config['Network']['certPath']
|
certPath = config['Network']['certPath']
|
||||||
certKeyPath = config['Network']['certKeyPath']
|
certKeyPath = config['Network']['certKeyPath']
|
||||||
|
|
||||||
@ -96,4 +97,9 @@ def load_user(user_id):
|
|||||||
api.add_resource(Notes, '/notes/<string:note_id>')
|
api.add_resource(Notes, '/notes/<string:note_id>')
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(host='0.0.0.0', port=port, ssl_context = (certPath, certKeyPath))
|
ssl_context = None
|
||||||
|
|
||||||
|
if https == "true":
|
||||||
|
ssl_context = (certPath, certKeyPath)
|
||||||
|
|
||||||
|
app.run(host='0.0.0.0', port=port, ssl_context = ssl_context)
|
Loading…
x
Reference in New Issue
Block a user