mikser-io-drive 11.0.3 → 11.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +26 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -202,6 +202,32 @@ export function drive(options = {}) {
202
202
  // WebDAV GET/PUT stream file bodies, so a facade must not
203
203
  // buffer this route.
204
204
  streaming: true,
205
+ // The verbs a DAV mount serves, and OPTIONS is the one
206
+ // that matters most.
207
+ //
208
+ // Listing it tells the engine this mount answers OPTIONS
209
+ // ITSELF, so the global CORS preflight steps aside
210
+ // (mikser-io 11.5.0+). It used to end every OPTIONS in the
211
+ // process with a 204 carrying no `DAV:` header and five
212
+ // REST verbs — and the Microsoft WebDAV redirector decides
213
+ // whether a URL is a share AT ALL from that header, so
214
+ // Explorer reported "The network name cannot be found"
215
+ // (0x80070043) and never reached the credential prompt.
216
+ // Finder, curl, Cyberduck and gvfs never noticed, because
217
+ // none of them gate on it.
218
+ //
219
+ // Nephele's own OPTIONS builds the real answer — `DAV:`
220
+ // with the compliance classes its adapter reports, and an
221
+ // Allow list including LOCK when class 2 is present. This
222
+ // list is what CORS advertises to browsers; the response
223
+ // Windows reads comes from nephele.
224
+ methods: [
225
+ 'OPTIONS', 'GET', 'HEAD', 'POST', 'PROPFIND',
226
+ ...(readOnly ? [] : [
227
+ 'PUT', 'DELETE', 'COPY', 'MOVE', 'MKCOL',
228
+ 'PROPPATCH', 'LOCK', 'UNLOCK',
229
+ ]),
230
+ ],
205
231
  label: 'WebDAV',
206
232
  detail: `(${ep.folder}${readOnly ? ', read-only' : ''})`,
207
233
  authLabel: verifier ? (verifier.name ?? 'auth')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mikser-io-drive",
3
- "version": "11.0.3",
3
+ "version": "11.0.4",
4
4
  "description": "WebDAV for mikser-io. Exposes working-folder directories as WebDAV endpoints via Nephele, authenticated through mikser-io-auth's htpasswd identity — so content can be edited from Finder, Explorer or any DAV client and the build picks the change up.",
5
5
  "main": "index.js",
6
6
  "type": "module",