{
"on_http_request": [
{
"actions": [
{
"type": "custom-response",
"config": {
"status_code": 503,
"body": "<html><body><h1>Service Unavailable</h1><p>Our servers are currently down for maintenance. Please check back later.</p></body></html>",
"headers": {
"content-type": "text/html"
}
}
}
]
}
],
"on_http_response": [
{
"name": "Log unsuccessful requests",
"expressions": [
"res.status_code < '200' && res.status_code >= '300'"
],
"actions": [
{
"type": "log",
"config": {
"metadata": {
"message": "Unsuccessful request",
"edge_id": "<YOUR-NGROK-DOMAIN>",
"success": false
}
}
}
]
}
]
}