mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-05 12:56:48 +02:00
fix(plugin-auth): check both endpoint and method
This commit is contained in:
@@ -84,7 +84,7 @@ func (m *APIKeyManager) ValidateAPIKeyForEndpoint(endpoint string, method string
|
||||
|
||||
// Check if the endpoint is permitted
|
||||
for _, permittedEndpoint := range pluginAPIKey.PermittedEndpoints {
|
||||
if permittedEndpoint.Endpoint == endpoint {
|
||||
if permittedEndpoint.Endpoint == endpoint && permittedEndpoint.Method == method {
|
||||
return pluginAPIKey, nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user