forked from mar10/wsgidav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_wsgidav.yaml
210 lines (173 loc) · 7.84 KB
/
sample_wsgidav.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# WsgiDAV configuration file
#
# 1. Rename this file to `wsgidav.yaml`
# 2. Adjust settings as appropriate
# 3. Run `wsgidav` from the same directory or pass file name with `--config` option.
#
# See http://wsgidav.readthedocs.io/en/latest/user_guide_configure.html
#
# ============================================================================
# SERVER OPTIONS
server: "cheroot"
server_args: {}
host: 0.0.0.0
port: 8080
# Add custom response headers (list of header-name / header-value tuples):
#response_headers:
# - ["Access-Control-Allow-Origin", "http://example.org"]
# Transfer block size in bytes
block_size: 8192
#: Add the MS-Author-Via Response Header to OPTIONS command to allow editing
#: with Microsoft Office (default: true)
add_header_MS_Author_Via: true
#: See issue #8
unquote_path_info: false
#: (See issue #73) Set null to activate on Python 3 only
re_encode_path_info: null
# ----------------------------------------------------------------------------
# SSL Support
#: The certificate should match the servers hostname, so the bogus certs will
#: not work in all scenarios.
#: (Paths can be absolute or relative to this config file.)
# ssl_certificate: "wsgidav/server/sample_bogo_server.crt"
# ssl_private_key: "wsgidav/server/sample_bogo_server.key"
# ssl_certificate_chain: None
#: Cheroot server supports 'builtin' and 'pyopenssl' (default: 'builtin')
# ssl_adapter: "pyopenssl"
# ----------------------------------------------------------------------------
#: Modify to customize the WSGI application stack:
middleware_stack:
- wsgidav.debug_filter.WsgiDavDebugFilter
- wsgidav.error_printer.ErrorPrinter
- wsgidav.http_authenticator.HTTPAuthenticator
- wsgidav.dir_browser.WsgiDavDirBrowser
- wsgidav.request_resolver.RequestResolver
# ==============================================================================
# SHARES
#: Application root, applied before provider mapping shares,
#: e.g. <mount_path>/<share_name>/<res_path>
mount_path: null
provider_mapping:
"/share1": "/path/to/share1"
"/share2":
- "/path/to/share2"
- true # read-only
# ==============================================================================
# AUTHENTICATION
http_authenticator:
#: Domain controller that is used to resolve realms and authorization.
#: Default null: wsgidav.dc.simple_dc.SimpleDomainController,
#: which uses the `user_mapping` option below.
#: (See http://wsgidav.readthedocs.io/en/latest/user_guide_configure.html
#: for an example of NT domain controller, etc.)
domain_controller: null
#: Allow basic authentication
accept_basic: false
#: Allow digest authentication
accept_digest: true
#: true (default digest) or false (default basic)
default_to_digest: true
#: Header field that will be accepted as authorized user.
#: Including quotes, for example: trusted_auth_header = "REMOTE_USER"
trusted_auth_header: null
#: NTDomainController only:
preset_domain: null
preset_server: null
# Access control per share, used by the default SimpleDomainController.
# These routes must match the provider mapping.
# NOTE: Provider routes without a matching entry here, are open for
# anonymous access!
user_mapping:
"/share1":
"user1":
password: "abc123"
description: "User 1 for Share 1"
roles: []
"/share2":
"user1":
password: "def456"
description: "User 1 for Share 2"
roles: []
"user2":
password: "qwerty"
description: "User 2 for Share 2"
roles: []
# ==============================================================================
# DEBUGGING
#: Set verbosity level (but will be overridden by -v or -q arguments)
verbose: 3
#: Set logging output format
#: (see https://docs.python.org/3/library/logging.html#logging.Formatter)
logger_format: "%(asctime)s.%(msecs)03d - <%(thread)05d> %(name)-27s %(levelname)-8s: %(message)s"
#logger_format: "%(asctime)s.%(msecs)03d - %(levelname)-8s: %(message)s"
logger_date_format: "%H:%M:%S"
#: Let ErrorPrinter middleware catch all exceptions to return as 500 Internal Error
catch_all: false
# Enable specific module loggers
# E.g. ["lock_manager", "property_manager", "http_authenticator", ...]
# enable_loggers: ["http_authenticator", ]
# Enable max. logging for certain http methods
# E.g. ["COPY", "DELETE", "GET", "HEAD", "LOCK", "MOVE", "OPTIONS", "PROPFIND", "PROPPATCH", "PUT", "UNLOCK"]
debug_methods: []
# Enable max. logging during litmus suite tests that contain certain strings
# E.g. ["lock_excl", "notowner_modify", "fail_cond_put_unlocked", ...]
debug_litmus: []
# ----------------------------------------------------------------------------
# WsgiDavDirBrowser
dir_browser:
#: List of fnmatch patterns that will be hidden in the directory listing
ignore:
- ".DS_Store" # macOS folder meta data
- "Thumbs.db" # Windows image previews
- "._*" # macOS hidden data files
#: Display WsgiDAV icon in header
icon: true
#: Raw HTML code, appended as footer (true: use a default trailer)
response_trailer: true
#: Display the name and realm of the authenticated user (or 'anomymous')
show_user: true
#: Send <dm:mount> response if request URL contains '?davmount'
#: Also add a respective link at the top of the listing
#: (See https://tools.ietf.org/html/rfc4709)
davmount: false
#: Add an 'open as webfolder' link (requires Windows IE <= 7!)
ms_mount: false
#: Invoke MS Office documents for editing using WebDAV by adding a JavaScript
#: click handler.
#: - For IE 11 and below invokes the SharePoint ActiveXObject("SharePoint.OpenDocuments")
#: - If the custom legacy Firefox plugin is available, it will be used
#: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ff407576(v%3Doffice.14)
#: - Otherwise the Office URL prefix is used (e.g. 'ms-word:ofe|u|http://server/path/file.docx')
ms_sharepoint_support: true
# ----------------------------------------------------------------------------
# Property Manager
# null: (default) Don't support dead properties
# true: Use in-memory property manager (NOT persistent)
property_manager: true
# Example:
# Use PERSISTENT shelve based property manager
# from wsgidav.prop_man.property_manager import ShelvePropertyManager
# property_manager: ShelvePropertyManager("wsgidav-props.shelve")
# Optional additional live property modification
mutable_live_props:
# Enable to allow clients to use e.g. the touch or cp / rsync commands with the
# preserve-timestamp flags in a mounted DAV share (may be RFC4918 incompliant)
- "{DAV:}getlastmodified"
# Handle Microsoft's Win32LastModifiedTime property.
# This is useful only in the case when you copy files from a Windows
# client into a WebDAV share. Windows sends the "last modified" time of
# the file in a Microsoft extended property called "Win32LastModifiedTime"
# instead of the standard WebDAV property "getlastmodified". So without
# this config option set to "True", the "last modified" time of the copied
# file will be "now" instead of its original value.
# The proper solution for dealing with the Windows WebDAV client is to use
# a persistent property manager. This setting is merely a work-around.
# NOTE: Works with Win10, can't work with Win7. Other versions untested.
emulate_win32_lastmod: true
# ----------------------------------------------------------------------------
# Lock Manager
lock_manager: true
# Example:
# Use PERSISTENT shelve based lock manager
# from wsgidav.lock_storage import LockStorageShelve
# lock_manager = LockStorageShelve("wsgidav-locks.shelve")