mar10 / wsgidav

A generic and extendable WebDAV server based on WSGI
https://wsgidav.readthedocs.io
MIT License
978 stars 150 forks source link

Cors error #273

Closed rusaym closed 1 year ago

rusaym commented 1 year ago

Describe the bug I'm trying to connect to my server through the js webdav client https://www.npmjs.com/package/webdav and got Cors error

image

Do I have to change something in my config?

To Reproduce Steps to reproduce the behavior:

  1. Start server with default settings
  2. Connect to server:
    
    const { createClient } = require("webdav");

const client = createClient( "http://localhost:8087/", { username: "marie", password: "myS3curePa$$w0rd" } );


**Environment:**

WsgiDAV/4.0.2 Python/3.10.6(64 bit) Linux-5.18.0-051800rc1-generic-x86_64-with-glibc2.35

mar10 commented 1 year ago

You could try to enable cors

cors:
    #: List of allowed Origins or '*'
    #: Default: false, i.e. prevent CORS
    # allow_origin: null
    allow_origin: '*'

See the sample config for details.