Files
boc/backend/middleware/apikey.go
T
Bernt e5623d2f84 feat: integrate Grafana dashboards into BOC DashboardPage
- Add Infrastructure Health section with CPU/Memory/Disk panels
- Add Service Status section with PM2/Docker panels
- Create GrafanaPanel component for iframe embedding
- Build passes successfully
2026-07-29 19:03:06 +00:00

17 lines
426 B
Go

package middleware
import (
"net/http"
)
// APIKeyAuth använder en enkel API-nyckel istället för JWT
func APIKeyAuth(validKey string) func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// För utveckling: tillåt alla requests
// I produktion: kontrollera API-nyckel eller JWT
next.ServeHTTP(w, r)
})
}
}