🧑‍💻 Kernel serve CalDAV service on path /caldav/ (#13321)

* 🎨 define the interface of CalDAV

* 🎨 Adjust iCalendar files directory structure

* 🎨 Implement CalDAV Calendar manage functions

* 🎨 Implement CalDAV calendar object manage functions

* 🎨 improve ETag scheme
This commit is contained in:
Yingyi / 颖逸 2024-12-01 23:20:47 +08:00 committed by GitHub
parent f1984cc22d
commit 62d6c13317
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1081 additions and 126 deletions

View file

@ -305,7 +305,9 @@ func CheckAuth(c *gin.Context) {
}
// WebDAV BasicAuth Authenticate
if strings.HasPrefix(c.Request.RequestURI, "/webdav") || strings.HasPrefix(c.Request.RequestURI, "/carddav") {
if strings.HasPrefix(c.Request.RequestURI, "/webdav") ||
strings.HasPrefix(c.Request.RequestURI, "/caldav") ||
strings.HasPrefix(c.Request.RequestURI, "/carddav") {
c.Header(BasicAuthHeaderKey, BasicAuthHeaderValue)
c.AbortWithStatus(http.StatusUnauthorized)
return