docs: complete console application scope acceptance and deployment guidance

This commit is contained in:
2026-09-27 12:29:31 +08:00
parent 1f2e7230dc
commit c2ca5e987f
10 changed files with 46 additions and 10 deletions

View File

@@ -1,12 +1,13 @@
package httpserver
import (
"net/http"
"strings"
"git.yuntuo.hk/k2safe/orbit/internal/consoleauth"
"git.yuntuo.hk/k2safe/orbit/internal/fault"
core "git.yuntuo.hk/k2safe/orbit/model"
"git.yuntuo.hk/k2safe/orbit/platform/auth"
"net/http"
"strings"
)
type consoleScopeKey struct{}
@@ -40,6 +41,9 @@ func consoleScopePath(r *http.Request) bool {
}
func RegisterConsoleScopes(server *http.Server, store consoleauth.Scopes) {
if server == nil {
return
}
mux, ok := server.Handler.(*http.ServeMux)
if !ok || store == nil {
return