15 lines
544 B
Go
15 lines
544 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"gitea.perlbach24.de/scripte/nexarch/internal/svcauth"
|
|
)
|
|
|
|
// registerAdminRoutes schuetzt die Lizenz-/Flag-Administration mit Dienst-Token
|
|
// und expliziter CORS-Ursprungsliste (QA-15 F-02 / LIC-07).
|
|
func registerAdminRoutes(mux *http.ServeMux, token string, origins []string, overview, toggle http.HandlerFunc) {
|
|
mux.HandleFunc("/admin/overview", svcauth.Protect(token, origins, "GET, OPTIONS", overview))
|
|
mux.HandleFunc("/admin/flags/toggle", svcauth.Protect(token, origins, "POST, OPTIONS", toggle))
|
|
}
|