%DOWNSTREAM_REMOTE_ADDRESS% 下游连接的远程地址,如果是 Ip 地址,那么其中会包含地址和端口。 注意:如果地址来自于proxy proto或者x-forwarded-for这可能不是远端节点的物理地址。 %DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT% 下游连接的远程地址,如果是 Ip 地址,那么其中不会包含地址和端口。 注意:如果地址来自于proxy...
text_format: "%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT% - - [%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" %RESPONSE_CODE% %BYTES_SENT% \"-\" \"%REQ(USER-AGENT)%\"\n" # 验证 172.31.73.1 - - [20xx-xx-28Txx:24:31.520Z] "GET / HTTP/1.1"...
socket_address: address: 0.0.0.0 port_value: 80 filter_chains: - filters: - name: envoy.http_connection_manager config: codec_type: auto stat_prefix: ingress_http access_log: - name: envoy.file_access_log config: path: "/dev/stdout" format: "[ACCESS_LOG][%START_TIME%] \"%REQ(:MET...
%BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\" \"%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%\"\n"# 支持命令操作符的文本字串;te...
(USER-AGENT)%","request-id":"%REQ(X-REQUEST-ID)%","authority":"%REQ(:AUTHORITY)%","upstream-host":"%UPSTREAM_HOST%","remote-ip":"%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"}# 支持命令操作符的json字串text_format_source: {...}# 支持命令操作符的文本字串,字串来自filename、inline_...
"%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"} 输出格式: {"start":"[2019-10-29T12:10:31.974Z] ","status":"200","upstream-host":"172.19.0.6:8786","upstream-service-time":"8","bytesreceived":"0","url":"/","authority":"172.19.0.7","protocol":"HTTP/1.1","duration":"8","bytes-sen...
"request-id": "%REQ(X-REQUEST-ID)%", "authority":"%REQ(:AUTHORITY)%","upstream-host":"%UPSTREAM_HOST%","remote-ip": "%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"}# 支持命令操作符的json字串 text_format_source:{...}# 支持命令操作符的文本字串,字串来自filename、inline_bytes或inline_strin...
port: 80 - conditions: - prefix: /secure services: - name: secureapp-default port: 80 virtualhost: fqdn: my.firstcontour.io Where the code added is: requestHeadersPolicy: set: - name: X-Client-IP value: '%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%' ...
localPort()); if (!state_.is_internally_created_) { // Only sanitize headers on first pass. // Modify the downstream remote address depending on configuration and headers. filter_manager_.setDownstreamRemoteAddress(ConnectionManagerUtility::mutateRequestHeaders( ...
use_remote_address:{...} xff_num_trusted_hops:... original_ip_detection_extensions:[] internal_address_config:{...} skip_xff_append:... via:... generate_request_id:{...} preserve_external_request_id:... always_set_request_id_in_response:... ...