fix: return 404 status code for .well-known routes if not found

This commit is contained in:
Elias Schneider
2026-05-18 18:15:54 +02:00
parent 7aacbd0245
commit 714b5b3307

View File

@@ -79,7 +79,7 @@ func RegisterFrontend(router *gin.Engine, oidcService *service.OidcService) erro
return
}
if strings.HasPrefix(path, "api/") {
if strings.HasPrefix(path, "api/") || strings.HasPrefix(path, ".well-known/") {
c.JSON(http.StatusNotFound, gin.H{"error": "API endpoint not found"})
return
}