Make drive a sort of web app
This commit is contained in:
parent
c3b9d024f5
commit
5081a3dab4
|
@ -20,13 +20,14 @@ drive.woozle.org {
|
||||||
import restricted-access
|
import restricted-access
|
||||||
|
|
||||||
# XXX: browsing says method not allowed
|
# XXX: browsing says method not allowed
|
||||||
@get {
|
@nondav {
|
||||||
method GET
|
method HEAD GET
|
||||||
}
|
}
|
||||||
# route overrides built-in ordering
|
# route overrides built-in ordering
|
||||||
route {
|
route {
|
||||||
file_server @get browse {
|
file_server @nondav {
|
||||||
root /srv/ext/
|
root /srv/ext/
|
||||||
|
browse /www/browse.html
|
||||||
}
|
}
|
||||||
reverse_proxy webdav:8000
|
reverse_proxy webdav:8000
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
|
@ -22,6 +22,8 @@ services:
|
||||||
target: /etc/caddy/Caddyfile
|
target: /etc/caddy/Caddyfile
|
||||||
- source: index.html
|
- source: index.html
|
||||||
target: /www/index.html
|
target: /www/index.html
|
||||||
|
- source: browse.html
|
||||||
|
target: /www/browse.html
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- host.docker.internal:host-gateway
|
- host.docker.internal:host-gateway
|
||||||
|
|
||||||
|
@ -148,10 +150,13 @@ configs:
|
||||||
name: dave.yaml-v3
|
name: dave.yaml-v3
|
||||||
Caddyfile:
|
Caddyfile:
|
||||||
file: Caddyfile
|
file: Caddyfile
|
||||||
name: Caddyfile-v35
|
name: Caddyfile-v37
|
||||||
index.html:
|
index.html:
|
||||||
file: index.html
|
file: index.html
|
||||||
name: index.html-v12
|
name: index.html-v12
|
||||||
|
browse.html:
|
||||||
|
file: browse.html
|
||||||
|
name: browse.html-v4
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
passwd:
|
passwd:
|
||||||
|
|
Loading…
Reference in New Issue