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
|
||||
|
||||
# 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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
- 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:
|
||||
|
|
Loading…
Reference in New Issue