Skip to main content

Edge Route Request Headers Module

Replace HTTPS Edge Route Request Headers Module

Request

PUT /edges/https/{edge_id}/routes/{id}/request_headers

Example Request

curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"add":{"x-frontend":"ngrok"},"enabled":true,"remove":["cache-control"]}' \
https://api.ngrok.com/edges/https/edghts_2gsqMduhp9ZJeksFdYzQAn3WD4y/routes/edghtsrt_2gsqMcss2wOor0Hz57UBVxAjc46/request_headers

Parameters

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
addMap<string, string>a map of header key to header value that will be injected into the HTTP Request before being sent to the upstream application server
removeList<string>a list of header names that will be removed from the HTTP Request before being sent to the upstream application server

Response

Returns a 200 response on success

Example Response

{
"add": {
"x-frontend": "ngrok"
},
"enabled": true,
"remove": ["cache-control"]
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
addMap<string, string>a map of header key to header value that will be injected into the HTTP Request before being sent to the upstream application server
removeList<string>a list of header names that will be removed from the HTTP Request before being sent to the upstream application server

Get HTTPS Edge Route Request Headers Module

Request

GET /edges/https/{edge_id}/routes/{id}/request_headers

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2gsqMduhp9ZJeksFdYzQAn3WD4y/routes/edghtsrt_2gsqMcss2wOor0Hz57UBVxAjc46/request_headers

Response

Returns a 200 response on success

Example Response

{
"add": {
"x-frontend": "ngrok"
},
"enabled": true,
"remove": ["cache-control"]
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
addMap<string, string>a map of header key to header value that will be injected into the HTTP Request before being sent to the upstream application server
removeList<string>a list of header names that will be removed from the HTTP Request before being sent to the upstream application server

Delete HTTPS Edge Route Request Headers Module

Request

DELETE /edges/https/{edge_id}/routes/{id}/request_headers

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2gsqMduhp9ZJeksFdYzQAn3WD4y/routes/edghtsrt_2gsqMcss2wOor0Hz57UBVxAjc46/request_headers

Response

Returns a 204 response with no body on success