{ "apps": { "http": { "http_port": 3010, "servers": { "srv0": { "listen": [ ":3010" ], "routes": [ { "match": [ { "host": [ "localhost" ] } ], "handle": [ { "handler": "subroute", "routes": [ { "handle": [ { "handler": "vars", "root": "/srv" } ] }, { "handle": [ { "error": "Internal Server Error", "handler": "error", "status_code": 500 } ], "match": [ { "path": [ "/fivehundred*" ] } ] }, { "handle": [ { "error": "Unauthorized", "handler": "error", "status_code": 410 } ], "match": [ { "path": [ "/private*" ] } ] }, { "handle": [ { "error": "Internal stuff", "handler": "error", "status_code": 401 } ], "match": [ { "path": [ "/testErr*" ] } ] }, { "handle": [ { "error": "Internal stuf", "handler": "error", "status_code": 301 } ], "match": [ { "path": [ "/testEer*" ] } ] }, { "handle": [ { "error": "Not found", "handler": "error", "status_code": 404 } ], "match": [ { "path": [ "/hidden*" ] } ] } ] } ], "terminal": true } ], "errors": { "routes": [ { "match": [ { "expression": "{http.error.status_code} in [410]" } ], "handle": [ { "handler": "subroute", "routes": [ { "handle": [ { "body": "generic error", "handler": "static_response" } ] } ] } ], "terminal": true }, { "match": [ { "expression": "{http.error.status_code} \u003e= 300 \u0026\u0026 {http.error.status_code} \u003c= 399 || {http.error.status_code} \u003e= 500 \u0026\u0026 {http.error.status_code} \u003c= 599" } ], "handle": [ { "handler": "subroute", "routes": [ { "handle": [ { "body": "It's anotheeeer error", "handler": "static_response" } ] } ] } ], "terminal": true }, { "handle": [ { "body": "Fallback error", "handler": "static_response" } ] } ] } } } } } }