feat: Azure API supported without verification (#48, #57)

This commit is contained in:
JustSong
2023-05-13 11:36:36 +08:00
parent fd19d7d246
commit 7a3378b4b7
5 changed files with 73 additions and 120 deletions

View File

@@ -63,7 +63,7 @@ func Distribute() func(c *gin.Context) {
}
c.Set("channel", channel.Type)
c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
if channel.Type == common.ChannelTypeCustom {
if channel.Type == common.ChannelTypeCustom || channel.Type == common.ChannelTypeAzure {
c.Set("base_url", channel.BaseURL)
}
c.Next()