mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #99] CORS needs 'Access-Control-Allow-Methods' header #43
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @XSnelliusX on GitHub (Jul 8, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/99
Problem
Im trying to upload files to a Dufs server from an other server over http.
For this I run the Dufs server with this command, to anable CORS:
dufs -A --enable-corsBut the PUT Request I send to the Server is blocked with the following error message:
After looking in to the server.rs I found that in the add_cors function only the
AccessControlAllowOrigin,AccessControlAllowCredentialsandAccessControlAllowHeadersheaders are set. However WebDav needs the PUT method and therefor theAccessControlAllowMethodsheader is needed.Environment:
@jens1o commented on GitHub (Jul 8, 2022):
Thank you very much for confirming and implementing the fix, @sigoden ! :) It is stunning that you are reacting this fast to newly made issues! :)