簡體   English   中英

Azure 應用程序網關在來自 APIGEE 時對請求正文進行條帶化

[英]Azure Application Gateway is striping request body when it comes from APIGEE

當 APIGEE 試圖訪問部署在 Azure 中的 API 作為集成了應用程序網關的 function 應用程序時,但是當請求到來時,它正在剝離請求主體。 結果我們收到了 400 個錯誤的請求,我們對這里發生的事情一無所知,歡迎任何幫助

• 根據您的解釋,您正在向 Azure 中的應用程序網關發送 POST 請求,在該網關后面部署了 function 應用程序。 因此,當來自 Apigee 的請求到達應用程序網關端點時,請求正文中的信息會被吞噬或消失。 這種情況僅發生在特定的 API 代理上,在這種情況下,發送的 apigee 請求正在考慮將應用程序網關部署為不可接受的 API 代理 因此,我請求您采取以下步驟:-

a) 當使用NGINX/Wireshark 日志發出 API 請求時收集 TCP 轉儲並分析它以確認目標端口為 443

b) 檢查從消息處理器發送到后端服務器的任何消息,並檢查日志中如下所示的任何消息:-

  [Unencrypted HTTP protocol detected over encrypted port, could indicate a dangerous misconfiguration.]

c) 如果目標服務器定義是在沒有“SSLInfo”部分的情況下創建的,則會在日志中遇到上述消息。 然后update the target server definition with the correct 'SSLInfo' section to make it secure

d) 然后重新啟動 apigee 和 Azure 端的“消息處理器”,以獲取目標服務器的最新定義。

e) 此外,檢查encoding specified in the HTTP request header 'Content-Encoding' is valid or not and the payload format sent by the client as a part of the HTTP request matches the encoding format specified in the 'Content-Encoding' header or not

• 您遇到的錯誤是上述情況的結果。 因此,您可以通過sending the request header as Content-Encoding:<payload format> and the request payload also in the same format來解決此問題。 下面給出了執行相同操作的示例:-

  curl -v "https://HOSTALIAS/v1/testgzip" -H "Content-Encoding: gzip" -X POST -d @request_payload.gz

有關上述內容的更多詳細信息,請參閱以下文檔鏈接:-

https://docs.apigee.com/api-platform/troubleshoot/runtime/400-decompressionfailureatrequest

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM