Edge Route Response Headers Module
Replace HTTPS Edge Route Response Headers Module
Request
PUT /edges/https/{edge_id}/routes/{id}/response_headers
Example Request
curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"add":{"Content-Security-Policy":"script-src 'self'","X-Frame-Options":"DENY"},"enabled":true}' \
https://api.ngrok.com/edges/https/edghts_2k5okcPZ5OriS9bRMBxzxUpvoJ5/routes/edghtsrt_2k5okfZSL1lJA5lXwf1Pllwt6eU/response_headers
Parameters
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
add | Map<string, string> | a map of header key to header value that will be injected into the HTTP Response returned to the HTTP client |
remove | List<string> | a list of header names that will be removed from the HTTP Response returned to the HTTP client |
Response
Returns a 200 response on success
Example Response
{
"add": {
"content-security-policy": "script-src 'self'",
"x-frame-options": "DENY"
},
"enabled": true,
"remove": []
}
Fields
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
add | Map<string, string> | a map of header key to header value that will be injected into the HTTP Response returned to the HTTP client |
remove | List<string> | a list of header names that will be removed from the HTTP Response returned to the HTTP client |
Get HTTPS Edge Route Response Headers Module
Request
GET /edges/https/{edge_id}/routes/{id}/response_headers
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2k5okcPZ5OriS9bRMBxzxUpvoJ5/routes/edghtsrt_2k5okfZSL1lJA5lXwf1Pllwt6eU/response_headers
Response
Returns a 200 response on success
Example Response
{
"add": {
"content-security-policy": "script-src 'self'",
"x-frame-options": "DENY"
},
"enabled": true,
"remove": []
}
Fields
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
add | Map<string, string> | a map of header key to header value that will be injected into the HTTP Response returned to the HTTP client |
remove | List<string> | a list of header names that will be removed from the HTTP Response returned to the HTTP client |
Delete HTTPS Edge Route Response Headers Module
Request
DELETE /edges/https/{edge_id}/routes/{id}/response_headers
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2k5okcPZ5OriS9bRMBxzxUpvoJ5/routes/edghtsrt_2k5okfZSL1lJA5lXwf1Pllwt6eU/response_headers
Response
Returns a 204 response with no body on success