Make drive a sort of web app

This commit is contained in:
Neale Pickett 2022-09-11 15:42:18 -06:00
parent c3b9d024f5
commit 5081a3dab4
3 changed files with 30 additions and 4 deletions

View File

@ -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
}

20
homelab/browse.html Normal file
View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>{{html .Name}}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/dom111/webdav-js/assets/css/style-min.css">
</head>
<body>
<script src="https://cdn.jsdelivr.net/gh/dom111/webdav-js/src/webdav-min.js"></script>
<!-- OMG this webdav-js project is such a kludge -->
<!--
<ul>
{{range .Items}}
<li><a href="{{html .URL}}">{{html .Name}}</a></li>
{{end}}
</ul>
-->
</body>
</html>

View File

@ -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: