refactor: unify internal api authentication
This commit is contained in:
@@ -51,7 +51,7 @@ func serveInternalCultivate(w http.ResponseWriter, r *http.Request, prefix strin
|
||||
writeIMError(w, r, http.StatusMethodNotAllowed, 30002, imReasonMethodNotAllowed, "method not allowed", nil)
|
||||
return
|
||||
}
|
||||
if !authorizeInternalAPI(w, r, internalCapabilityCultivate) {
|
||||
if !authorizeInternalAPI(w, r) {
|
||||
return
|
||||
}
|
||||
parts := splitInternalPath(strings.Trim(strings.TrimPrefix(r.URL.Path, prefix), "/"))
|
||||
|
||||
Reference in New Issue
Block a user