mholt / caddy-webdav

WebDAV handler module for Caddy
Apache License 2.0
222 stars 23 forks source link

Multiuser/scope support is missing in the new webdav addon #15

Open delight opened 3 years ago

delight commented 3 years ago

Scopes as provided by the webdav "predecessor" addon in caddy 1.0.4 is not available in caddy 2 (2.2.1)

I used the following config in caddy 1.0.4 which worked just as wanted. Couldn't get similar mult user access functionality in caddy 2 and the new webdav addon.

webdav.somedomain.duckdns.org {
    basicauth / super userpwd
    basicauth / user2 userpwd
    basicauth / user3 userpwd
    basicauth / user4 userpwd
    webdav {
        super:
        scope /home/DATA/webdav
        user2:
        scope /home/DATA/webdav/.user2
        user3:
        scope /home/DATA/webdav/.user3
        user4:
        scope /home/DATA/webdav/.user3
    }
    log /etc/caddy/access-webdav.log
}
delight commented 3 years ago

For anyone interested the following works for a single user with basicauth

webdav.somedomain.duckdns.org {
    basicauth {
        super JDJhJDEwJEVCNmdaNEg2Ti5iejRMYkF3MFZhZ3VtV3E1SzBWZEZ5Q3VWc0tzOEJwZE9TaFlZdEVkZDhX
    }
    webdav {
        root /home/DATA/webdav
    }
}