Przeglądaj źródła

fix(responses): allow pass-through body for specific channel settings. (close #1762)

CaIon 3 miesięcy temu
rodzic
commit
93adcd57d7
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      relay/responses_handler.go

+ 1 - 1
relay/responses_handler.go

@@ -41,7 +41,7 @@ func ResponsesHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *
 	}
 	adaptor.Init(info)
 	var requestBody io.Reader
-	if model_setting.GetGlobalSettings().PassThroughRequestEnabled {
+	if model_setting.GetGlobalSettings().PassThroughRequestEnabled || info.ChannelSetting.PassThroughBodyEnabled {
 		body, err := common.GetRequestBody(c)
 		if err != nil {
 			return types.NewError(err, types.ErrorCodeReadRequestBodyFailed, types.ErrOptionWithSkipRetry())