added explicit only mode for docker provider, updated dependencies

This commit is contained in:
yusing
2024-09-29 11:24:41 +08:00
parent e2b08d8667
commit 415f169f48
11 changed files with 43 additions and 25 deletions

View File

@@ -42,7 +42,7 @@ func NewHandler(cfg *config.Config) http.Handler {
func checkHost(f http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if r.Host != common.APIHTTPAddr {
Logger.Warnf("invalid request to API server with host: %s, expected: %s", r.Host, common.APIHTTPAddr)
Logger.Warnf("invalid request to API server with host: %s, expect %s", r.Host, common.APIHTTPAddr)
w.WriteHeader(http.StatusNotFound)
w.Write([]byte("invalid request"))
return