Configuration for modifying HTTP headers in tunnel requests.
// Add a custom header{ key: "X-Custom-Header", value: ["my-value"], type: "add" }// Remove a header (value should be undefined, null, or empty array){ key: "X-Unwanted-Header", type: "remove" }// or{ key: "X-Unwanted-Header", value: null, type: "remove" }// or{ key: "X-Unwanted-Header", value: [], type: "remove" }// Update an existing header{ key: "User-Agent", value: ["MyApp/1.0"], type: "update" } Copy
// Add a custom header{ key: "X-Custom-Header", value: ["my-value"], type: "add" }// Remove a header (value should be undefined, null, or empty array){ key: "X-Unwanted-Header", type: "remove" }// or{ key: "X-Unwanted-Header", value: null, type: "remove" }// or{ key: "X-Unwanted-Header", value: [], type: "remove" }// Update an existing header{ key: "User-Agent", value: ["MyApp/1.0"], type: "update" }
The header key.
The action to perform: add, remove, or update.
Optional
The header value. Required for "add" and "update" types. For "remove" type, this field should be undefined, null, or an empty array.
Configuration for modifying HTTP headers in tunnel requests.
Example