Closed nicksay closed 8 years ago
In addition to the standard SPF headers (e.g. X-SPF-Referer), this change allows the client to specify custom headers to send with requests.
X-SPF-Referer
These headers will be set globally using the request-headers config:
request-headers
spf.init({ 'request-headers': { 'X-Custom-Header-One': 'Custom Value One', 'X-Custom-Header-Two': 'Custom Value Two' } })
Or, they may be set on a per-request basis for API calls using options:
spf.navigate(url, { headers: { 'X-Custom-Header-One': 'Custom Value One', 'X-Custom-Header-Two': 'Custom Value Two' } })
For now, gate the feature using the experimental-request-headers config and the experimental_headers option.
experimental-request-headers
experimental_headers
Progress on #390
@youtube/spfjs PTAL
lgtm
In addition to the standard SPF headers (e.g.
X-SPF-Referer
), this change allows the client to specify custom headers to send with requests.These headers will be set globally using the
request-headers
config:Or, they may be set on a per-request basis for API calls using options:
For now, gate the feature using the
experimental-request-headers
config and theexperimental_headers
option.Progress on #390