header
文档中心

回源HTTP请求头配置

更新时间: 2025-08-05 06:26:59

CDN 默认支持携带一些头部回源,也支持自定义配置回源 HTTP 请求头部,供您统计和分析源站业务状况。

 

 

操作类型说明

 

类型说明
设置变更指定请求头部参数的取值为设置后的值;若设置的头部不存在,则会增加该头部;若回源同名的头部已存在,则会覆盖原有的值。
增加增加指定的回源请求头部参数;若设置的同名的头部已存在,则会追加新的值。
删除删除指定的请求头参数。

 

参数说明

 

参数说明
头部参数长度1~100。以字母开头,由数字0 - 9、字符a - z、A - Z,及特殊符“-”组成。
头部取值
  • 长度为1~1000。
  • 由数字0 - 9、字符a - z、A - Z,及特殊符“.”、“-”、“_”、“*”、“#”、“!”、“&”、“+”、“|”、“^”、“~”、“'”、“"”、“/”、“:”、“;”、“,”、“=”、“@”、“?”、“<”、“>”组成。
  • 不支持变量配置,如:$client_ip,$remote_port等。
  • 一个请求头参数中可以配置多个值,多个值用英文逗号(,)分隔。

 

注意事项

 

  • 回源 HTTP 请求头配置规则最多可配置10条。
  • 根据列表中配置项的顺序来确定优先级,列表顶部的优先级大于列表底部。相同配置头部参数顶部生效。

 

以下标准头部暂时不支持设置/增加/删除回源 HTTP 请求头:

 

www-authenticate
authorization
proxy-authenticate
proxy-authorization
age
cache-control
clear-site-data
expires
pragma
warning
accept-ch
accept-ch-lifetime
early-data
content-dpr
dpr
device-memory
save-data
viewport-width
width
last-modified
etag
if-match
if-none-match
if-modified-since
if-unmodified-since
vary
connection
keep-alive
accept
accept-charset
expect
max-forwards
access-control-allow-origin
access-control-max-age
access-control-allow-headers
access-control-allow-methods
access-control-expose-headers
access-control-allow-credentials
access-control-request-headers
access-control-request-method
origin

timing-allow-origin
dnt
tk
content-disposition
content-length
content-type
content-encoding
content-language
content-location
forwarded
x-forwarded-host
x-forwarded-proto
via
from
host
referer-policy
allow
server
accept-ranges
range
if-range
content-range
cross-origin-embedder-policy
cross-origin-opener-policy
cross-origin-resource-policy
content-security-policy
content-security-policy-report-only
expect-ct
feature-policy
strict-transport-security
upgrade-insecure-requests
x-content-type-options
x-download-options
x-frame-options(xfo)
x-permitted-cross-domain-policies
x-powered-by
x-xss-protection
public-key-pins
public-key-pins-report-only
sec-fetch-site
sec-fetch-mode
sec-fetch-user
sec-fetch-dest
last-event-id
nel

ping-from
ping-to
report-to
transfer-encoding
te
trailer
sec-websocket-key
sec-websocket-extensions
sec-websocket-accept
sec-websocket-protocol
sec-websocket-version
accept-push-policy
accept-signature
alt-svc
date
large-allocation
link
push-policy
retry-after
signature
signed-headers
server-timing
service-worker-allowed
sourcemap
upgrade
x-dns-prefetch-control
x-firefox-spdy
x-pingback
x-requested-with
x-robots-tag
x-ua-compatible
max-age

 

×
×