{
  "name": "internal-router",
  "routes": [
    {
      "method": "GET",
      "path": "/",
      "handler": "self",
      "description": "Return this routing table as JSON"
    },
    {
      "method": "GET",
      "path": "/archinstall",
      "handler": "redirect",
      "status": 301,
      "target": "/gh/raw/kurashizu/dotfiles/main/install-arch.sh",
      "description": "Legacy alias used by install-arch one-liner"
    },
    {
      "method": "ANY",
      "path": "/gh/<sub>/<rest>",
      "handler": "proxy",
      "upstreams": {
        "raw": "https://raw.githubusercontent.com",
        "api": "https://api.github.com",
        "codeload": "https://codeload.github.com",
        "objects": "https://objects.githubusercontent.com",
        "gist": "https://gist.github.com",
        "web": "https://github.com"
      },
      "description": "Forward request to upstreams[<sub>] + <rest>",
      "note": "<sub> must be a key in upstreams; unknown <sub> returns 400 with the known list"
    },
    {
      "method": "ANY",
      "path": "<other>",
      "handler": "404",
      "description": "Returns { error, path, hint: 'see GET / for routes' }"
    }
  ]
}