1. tag support custom color
2. support 403 ban
3. add .dockerignore
This commit is contained in:
linzhaoming
2024-06-17 17:40:39 +08:00
parent b173e1e4ce
commit f04a81adf2
5 changed files with 27 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ func ShouldDisableChannel(err *relaymodel.OpenAIError, statusCode int) bool {
if err == nil {
return false
}
if statusCode == http.StatusUnauthorized {
if statusCode == http.StatusUnauthorized || statusCode == http.StatusForbidden {
return true
}
switch err.Code {
@@ -59,6 +59,8 @@ func ShouldDisableChannel(err *relaymodel.OpenAIError, statusCode int) bool {
return true
} else if strings.HasPrefix(err.Message, "You exceeded your current quota") {
return true
} else if strings.HasPrefix(err.Message, "Permission denied") {
return true
}
return false
}