add atom feed support

This commit is contained in:
ngn
2024-04-11 14:41:27 +03:00
parent b2b4bc0a98
commit 2a95341a99
7 changed files with 87 additions and 3 deletions

View File

@ -10,13 +10,16 @@ import (
func CorsMiddleware(c *fiber.Ctx) error {
c.Set("Access-Control-Allow-Origin", "*")
c.Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")
c.Set("Access-Control-Allow-Headers",
"Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")
c.Set("Access-Control-Allow-Methods", "PUT, DELETE, GET")
return c.Next()
}
func main() {
app := fiber.New()
app := fiber.New(fiber.Config{
DisableStartupMessage: true,
})
app.Use(CorsMiddleware)
db, err := sql.Open("sqlite3", "data.db")