1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| xiaoy@aliyun:/opt$ cat config.yml address: 0.0.0.0 port: 6060
# TLS-related settings if you want to enable TLS directly. tls: false cert: cert.pem key: key.pem
# Prefix to apply to the WebDAV path-ing. Default is '/'. prefix: /
# Enable or disable debug logging. Default is 'false'. debug: true
# Disable sniffing the files to detect their content type. Default is 'false'. noSniff: false
# Whether the server runs behind a trusted proxy or not. When this is true, # the header X-Forwarded-For will be used for logging the remote addresses # of logging attempts (if available). behindProxy: false
# The directory that will be able to be accessed by the users when connecting. # This directory will be used by users unless they have their own 'directory' defined. # Default is '.' (current directory). directory: /data
# The default permissions for users. This is a case insensitive option. Possible # permissions: C (Create), R (Read), U (Update), D (Delete). You can combine multiple # permissions. For example, to allow to read and create, set "RC". Default is "R". permissions: CRUD
# The default permissions rules for users. Default is none. Rules are applied # from last to first, that is, the first rule that matches the request, starting # from the end, will be applied to the request. rules: []
# The behavior of redefining the rules for users. It can be: # - overwrite: when a user has rules defined, these will overwrite any global # rules already defined. That is, the global rules are not applicable to the # user. # - append: when a user has rules defined, these will be appended to the global # rules already defined. That is, for this user, their own specific rules will # be checked first, and then the global rules. # Default is 'overwrite'. rulesBehavior: overwrite
# Logging configuration log: # Logging format ('console', 'json'). Default is 'console'. format: console # Enable or disable colors. Default is 'true'. Only applied if format is 'console'. colors: true # Logging outputs. You can have more than one output. Default is only 'stderr'. outputs: - stderr
# CORS configuration cors: # Whether or not CORS configuration should be applied. Default is 'false'. enabled: false # credentials: true # allowed_headers: # - Depth # allowed_hosts: # - * # allowed_methods: # - GET # exposed_headers: # - Content-Length # - Content-Range
# The list of users. If the list is empty, then there will be no authentication. # Otherwise, basic authentication will automatically be configured. # # If you're delegating the authentication to a different service, you can proxy # the username using basic authentication, and then disable webdav's password # check using the option: # # noPassword: true users: # Example 'admin' user with plaintext password. - username: xiaoy password: "110isfaker." scope: /
|