mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
feat: webdav integration
This patch provides an optional way to integrate an external WebDAV server so that the super-productivity container can serve as a WebDAV server with base url http://localhost/webdav/ . It includes the following changes: **Replace the default nginx config file** Besides serving the web app, the new nginx config file also forwards all the requests with paths starting with "/webdav/" to a backend WebDAV server specified by the environment variable WEBDAV_BACKEND. Note that during forwarding, the path prefix "/webdav" will be removed. **Use hacdias/webdav as default WebDAV backend server** The docker-compose.yaml provides an example setup to use the docker image [hacdias/webdav](https://github.com/hacdias/webdav) as the WebDAV backend server. An example for the configuration of the WebDAV server is also provided in webdav.yaml.
This commit is contained in:
parent
696097141e
commit
14b8d0fd64
5 changed files with 93 additions and 0 deletions
26
nginx/default.conf.template
Normal file
26
nginx/default.conf.template
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# serve super-productivity as static files at the path /
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
# forward requests starting with "/webdav/" to $WEBDAV_BACKEND
|
||||
# note: the prefix "/webdav" is removed during forwarding
|
||||
location = /webdav {
|
||||
return 302 /webdav/;
|
||||
}
|
||||
location /webdav/ {
|
||||
proxy_pass $WEBDAV_BACKEND/;
|
||||
# note: the trailing slash here matters!
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue