support webdav methods
Opened this issue · 2 comments
I'm using CORS unblock with WEBDAV (https://tools.ietf.org/html/rfc2518). I need it to enable the following http methods, taken from rfc2518 section 8
- PROPFIND
- PROPPATCH
- MKCOL
- GET
- HEAD
- POST
- DELETE
- PUT
- COPY
- MOVE
- LOCK
and headers, taken from section 9 "9 HTTP Headers for Distributed Authoring"
- DAV
- Depth
- Destiation
- If
- No-tag-list
- tagged-list
- lock-token
- overwrite
- status-uri
- timeout
In fact, I don't need all of those personally. But if possible, I'd like to be able to configure the CORS manipulation in the addon myself somehow. Is that possible?
I haven't touched this in a while but I'm pretty very few things are hard-coded. In particular, and the source seems to confirm it, all the Access-Control-Request-*
headers from the preflight requests should automatically be green-lit in the corresponding Access-Control-Allow-*
headers.
And as far as I remember, which is not well, the preflight request should reflect the real request being made and ask for the methods and headers concerned.
I can't help but notice you mention "CORS Unblock", I'm guessing it's a typo since that would be a different project.
Anyway, has there been an actual error ?
After reading your code, I agree with what you're saying. From what I understand, your plugin replaces the response's Access-Control-Allow-* headers with the ones that were requested by the client. IMO this is a smart way to solving the problem. So essentially it should work with webdav-specific requests.
I'll try once again and keep you posted.
can't help but notice you mention "CORS Unblock", I'm guessing it's a typo since that would be a different project.
Indeed I filed the same issue over there.