設定 HTTP 要求/回應標頭限制

邊緣路由器和訊息處理器對要求/回應標頭大小和行大小設有預先定義的限制。

設定路由器的限制

針對路由器,編輯 /opt/apigee/customer/application/router.properties 中的下列屬性來變更預設值:

# Request buffers
  # default:
  # conf_load_balancing_load.balancing.driver.large.header.buffers=8 16k
  # new value:
  conf_load_balancing_load.balancing.driver.large.header.buffers=8 32k

  # Response buffers
  # default:
  # conf_load_balancing_load.balancing.driver.proxy.buffer.size=64k
  # new value:
  conf_load_balancing_load.balancing.driver.proxy.buffer.size=128k

如果該檔案不存在,請建立一個。

對於 conf_load_balancing_load.balancing.driver.large.header.buffers,第一個參數會指定緩衝區數量,以及每個緩衝區的第二個參數。緩衝區會動態分配,並在使用後釋出。只有在要求標頭超過 1 KB 時,系統才會使用這些設定。如果標頭要求 URI 小於 1 KB,系統只會使用大型緩衝區。

針對 conf_load_balancing_load.balancing.driver.proxy.buffer.size,請指定回應緩衝區的大小。

邊緣路由器是以 Nginx 實作。如要進一步瞭解這些屬性,請參閱:

變更這些屬性後,您必須重新啟動路由器:

/opt/apigee/apigee-service/bin/apigee-service edge-router restart

設定郵件處理器的限制

針對處理傳送至後端服務的訊息處理器,請在 /opt/apigee/customer/application/message-processor.properties 中編輯下列屬性,以變更這些預設值:

conf/http.properties+HTTPRequest.line.limit=7k
conf/http.properties+HTTPRequest.headers.limit=25k
conf/http.properties+HTTPResponse.line.limit=2k
conf/http.properties+HTTPResponse.headers.limit=25k

如果該檔案不存在,請建立一個。

變更以下屬性後,您必須重新啟動訊息處理器:

/opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart