Fix Media Articlrd
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
Gitea Actions Demo / build-and-test (push) Failing after 1m2s

This commit is contained in:
2026-11-01 04:06:17 +01:00
parent f9b7e20841
commit f75dd3a9fb
9 changed files with 75 additions and 27 deletions
+9 -9
View File
@@ -21,15 +21,15 @@ import (
func New(admin *handlers.AdminHandler, bookshelf *handlers.BookshelfHandler, comics *handlers.ComicsHandler, media *handlers.MediaHandler, tysc *handlers.TyscHandler) *gin.Engine {
router := gin.New()
router.Use(gin.Recovery())
router.Use(gin.LoggerWithConfig(gin.LoggerConfig{
SkipPaths: []string{"/health", "/public/style/main.css"},
}))
//router.Use(gin_slog.SetLogger(
// gin_slog.WithSkipPath([]string{"/health", "/public/style/main.css"}),
// gin_slog.WithDefaultLevel(slog.LevelInfo),
// gin_slog.WithClientErrorLevel(slog.LevelInfo),
// gin_slog.WithServerErrorLevel(slog.LevelInfo),
// ))
// router.Use(gin.LoggerWithConfig(gin.LoggerConfig{
// SkipPaths: []string{"/health", "/public/style/main.css"},
// }))
router.Use(gin_slog.SetLogger(
gin_slog.WithSkipPath([]string{"/health", "/public/style/main.css"}),
gin_slog.WithDefaultLevel(slog.LevelInfo),
gin_slog.WithClientErrorLevel(slog.LevelInfo),
gin_slog.WithServerErrorLevel(slog.LevelInfo),
))
router.Use(cors.New(cors.Config{
AllowOrigins: []string{"https://app.example.com"},
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE"},