diff --git a/services/ical/service/routes.go b/services/ical/service/routes.go index d94f2b1..f7da962 100644 --- a/services/ical/service/routes.go +++ b/services/ical/service/routes.go @@ -41,14 +41,15 @@ func AddFeedRoutes(app model.AppType) { return c.SendStatus(fiber.StatusGone) } - if ifNoneMatch == eTag { - return c.SendStatus(fiber.StatusNotModified) - } - if err != nil { slog.Error("Failed to get feed", "error", err, "token", token) return c.SendStatus(fiber.StatusNotFound) } + + if ifNoneMatch == eTag && ifNoneMatch != "" { + return c.SendStatus(fiber.StatusNotModified) + } + c.Response().Header.Set("Content-type", "text/calendar") c.Response().Header.Set("charset", "utf-8") c.Response().Header.Set("Content-Disposition", "inline")