From 5081a3dab4559832862ea8852aac12695c554854 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 11 Sep 2022 15:42:18 -0600 Subject: [PATCH] Make drive a sort of web app --- homelab/Caddyfile | 7 ++++--- homelab/browse.html | 20 ++++++++++++++++++++ homelab/docker-compose.yaml | 7 ++++++- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 homelab/browse.html diff --git a/homelab/Caddyfile b/homelab/Caddyfile index 4959d5c..9a4b3d7 100644 --- a/homelab/Caddyfile +++ b/homelab/Caddyfile @@ -20,13 +20,14 @@ drive.woozle.org { import restricted-access # XXX: browsing says method not allowed - @get { - method GET + @nondav { + method HEAD GET } # route overrides built-in ordering route { - file_server @get browse { + file_server @nondav { root /srv/ext/ + browse /www/browse.html } reverse_proxy webdav:8000 } diff --git a/homelab/browse.html b/homelab/browse.html new file mode 100644 index 0000000..c02eac8 --- /dev/null +++ b/homelab/browse.html @@ -0,0 +1,20 @@ + + + + {{html .Name}} + + + + + + + + + + diff --git a/homelab/docker-compose.yaml b/homelab/docker-compose.yaml index 99effc0..744f9b0 100644 --- a/homelab/docker-compose.yaml +++ b/homelab/docker-compose.yaml @@ -22,6 +22,8 @@ services: target: /etc/caddy/Caddyfile - source: index.html target: /www/index.html + - source: browse.html + target: /www/browse.html extra_hosts: - host.docker.internal:host-gateway @@ -148,10 +150,13 @@ configs: name: dave.yaml-v3 Caddyfile: file: Caddyfile - name: Caddyfile-v35 + name: Caddyfile-v37 index.html: file: index.html name: index.html-v12 + browse.html: + file: browse.html + name: browse.html-v4 secrets: passwd: