1
0
forked from baron/baron-sso

feat(backend): backfill error code on legacy error responses

This commit is contained in:
Lectom C Han
2026-02-13 11:20:15 +09:00
parent db71364e80
commit 1bc2cfb507
3 changed files with 143 additions and 0 deletions

View File

@@ -317,6 +317,9 @@ func main() {
EnableStackTrace: true,
}))
// Backfill `code` on legacy JSON error responses during migration period.
app.Use(middleware.ErrorCodeEnricher())
allowedOrigins := getEnv("CORS_ALLOWED_ORIGINS", "http://localhost:5000")
allowCredentials := allowedOrigins != "*"
app.Use(cors.New(cors.Config{