api_key验证方式
This commit is contained in:
parent
fbdd8c2ff2
commit
18e919113f
@ -1,7 +1,6 @@
|
||||
package agent
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
@ -21,7 +20,6 @@ func (a *keyChecker) check(c *client, r *http.Request) bool {
|
||||
apikey = r.RequestURI[i+len("api_key="):]
|
||||
}
|
||||
}
|
||||
fmt.Printf("apikey = %s\n", apikey)
|
||||
if len(apikey) > 0 && strings.HasPrefix(apikey, "simpletest2025_") {
|
||||
c.setApiKey(apikey)
|
||||
return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user