HTTP リクエスト/レスポンス ヘッダーの制限の設定

Edge Router と Message Processor には、リクエスト/レスポンス ヘッダーのサイズと行サイズに対する上限が事前定義されています。

Router の上限を構成する

Router では、/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 では、最初のパラメータでバッファの数を指定し、2 番目のパラメータで各バッファのサイズを指定します。バッファは動的に割り当てられ、使用後に解放されます。これらの設定は、リクエスト ヘッダーが 1 KB を超える場合にのみ使用されます。ヘッダー リクエスト URI が 1 KB 未満のリクエストでも、大きなバッファは使用されません。

conf_load_balancing_load.balancing.driver.proxy.buffer.size では、レスポンス バッファのサイズを指定します。

Edge Router は Nginx を使用して実装されます。これらのプロパティの詳細については、以下をご覧ください。

これらのプロパティを変更した後は、Router を再起動する必要があります。

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

Message Processor の上限の構成

バックエンド サービスへの送信リクエストを処理する Message Processor の場合、/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

このファイルが存在しない場合は作成します。

これらのプロパティを変更したら、Message Processor を再起動する必要があります。

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