When the file /data/webdav.json does not exist, http://127.0.0.1/ will map to the /data directory.
logging output
WARNING: load config value from file[/data/webdav.json] failed, [Errno 2] No such file or directory: '/data/webdav.json'
INFO: [asgi_webdav.webdav] ASGI WebDAV(v0.3.1) starting...
INFO: [asgi_webdav.distributor] Mapping Prefix: / => file:///data
INFO: [asgi_webdav.auth] Register Account: username, allow:[''], deny:[]
INFO: [uvicorn] Started server process [7]
INFO: [uvicorn] Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
When the file exists
When the file exists, the mapping relationship is defined by the file content.
When the value of admin is true, the user can access the web page /_/admin/xxx
Permissions Format/Example
Introduced in 0.3.1
Last updated in 0.3.1
Value
Allow
Deny
["+"]
Any
-
["-"]
-
Any
["+^/$"]
/
/path
["+^/path"]
/path,/path/sub
/other
["+^/path", "-^/path/sub2"]
/path,/path/sub1
/path/sub2
HTTPDigestAuth Object
Introduced in 0.7.0
Last updated in 0.9.0
Key
Value Type
Default Value
enable
bool
false
enable_rule
str
``
disable_rule
str
neon/
When enable is true, the disable_rule is valid
When enable is false, the enable_rule is valid
for URL Mapping
Provider Object
Introduced in 0.1
Last updated in 1.4.0
Key
Value Type
Default Value
prefix
str
-
uri
str
-
home_dir
bool
false
read_only
bool
false
Home Directory
When home_dir is true, it is the home directory. The prefix recommends using /~ or /home.
When home_dir is true and prefix is /~ and uri is file:///data/homes and username is user_x
; http://webdav.host/~/path will map to file:///data/homes/user_x/path.
When read_only is true; it is a read only directory, include subdirectories.