You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the file /data/webdav.toml(.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
Anonymous Object
Introduced in 1.6
Last updated in 1.6
Key
Value Type
Default Value
enable
bool
false
user
User
User("anonymous", "", ["+"])
allow_missing_auth_header
bool
true
Anonymous accounts can be authenticated via HTTP header at any time, just like normal users.
If allow_missing_auth_header is true, anonymous requests will be treated as being requested by an anonymous account.
More detail, please see howto.
HTTPBasicAuth Object
Introduced in 1.5
Last updated in 1.6
Key
Value Type
Default Value
Changed
cache_type
str
memory
v1.5
cache_timeout
int
-1
v1.5
cache_type allowed value
bypass
memory
expiring
cache_timeout
Unit: second
Supported cache_type:
expiring
Value
Meaning
-1
cache does not expire (default)
0
cache is disabled
>0
seconds until each cache entry expires
HTTPDigestAuth Object
Introduced in 0.7
Last updated in 0.9
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.6
Key
Value Type
Default Value
prefix
str
-
uri
str
-
type
str
""
home_dir
bool
false
read_only
bool
false
ignore_property_extra
bool
true
When read_only is true; it is a read only directory, include subdirectories.
When ignore_property_extra is true; The Provider ignores the extra property, based on the Provider's implementation.
Provider Type
Some providers require a type to ensure proper identification. eg: webhdfs
Provider
Type
Required
FileSystemProvider
fs
-
MemoryProvider
memory
-
WebHDFSProvider
webhdfs
+
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.