summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-11-27 09:09:23 +0000
committerLars Wirzenius <liw@liw.fi>2020-11-27 09:09:23 +0000
commite322d41557d43c027ae36bb24d9399944ed2a05f (patch)
tree1296b0595a4effe7cb462ffa983f5f4e7728e766
parentcf714f6eda475bbf5479cb8577cd12cacde18016 (diff)
parent1c82e205572bbf1927f1a19a1b247b8aa7bdf58c (diff)
downloadobnam2-e322d41557d43c027ae36bb24d9399944ed2a05f.tar.gz
Merge branch 'tls' into 'main'
feat! make obnam-server always use TLS See merge request larswirzenius/obnam!28
-rw-r--r--client.yaml2
-rw-r--r--src/bin/obnam-server.rs6
-rw-r--r--subplot/server.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/client.yaml b/client.yaml
index fbe0b54..53582aa 100644
--- a/client.yaml
+++ b/client.yaml
@@ -1,3 +1,3 @@
-server_url: http://localhost:8888/chunks
+server_url: https://localhost:8888/chunks
root: /home/liw/pers/debian-ansible
dbname: foo.db
diff --git a/src/bin/obnam-server.rs b/src/bin/obnam-server.rs
index cf53d2f..682b5a7 100644
--- a/src/bin/obnam-server.rs
+++ b/src/bin/obnam-server.rs
@@ -66,9 +66,9 @@ async fn main() -> anyhow::Result<()> {
debug!("starting warp");
warp::serve(webroot)
- // .tls()
- // .key_path(config_bare.tls_key)
- // .cert_path(config_bare.tls_cert)
+ .tls()
+ .key_path(config.tls_key)
+ .cert_path(config.tls_cert)
.run(([127, 0, 0, 1], config.port))
.await;
Ok(())
diff --git a/subplot/server.py b/subplot/server.py
index 5952cb2..c4c01e1 100644
--- a/subplot/server.py
+++ b/subplot/server.py
@@ -33,7 +33,7 @@ def start_chunk_server(ctx):
logging.debug(f"Picked randomly port for obnam-server: {config['port']}")
ctx["config"] = config
- ctx["server_url"] = f"http://localhost:{port}/chunks"
+ ctx["server_url"] = f"https://localhost:{port}/chunks"
start_daemon(
ctx,