diff --git a/AGHTechDoc.md b/AGHTechDoc.md index cfe0304f..bd526fc8 100644 --- a/AGHTechDoc.md +++ b/AGHTechDoc.md @@ -27,6 +27,10 @@ Contents: * DNS access settings * List access settings * Set access settings +* Rewrites + * API: List rewrite entries + * API: Add a rewrite entry + * API: Remove a rewrite entry ## First startup @@ -682,3 +686,60 @@ Request: Response: 200 OK + + +## Rewrites + +This section allows the administrator to easily configure custom DNS response for a specific domain name. +A, AAAA and CNAME records are supported. + + +### API: List rewrite entries + +Request: + + GET /control/rewrite/list + +Response: + + 200 OK + + [ + { + domain: "..." + answer: "..." + } + ... + ] + + +### API: Add a rewrite entry + +Request: + + POST /control/rewrite/add + + { + domain: "..." + answer: "..." // "1.2.3.4" (A) || "::1" (AAAA) || "hostname" (CNAME) + } + +Response: + + 200 OK + + +### API: Remove a rewrite entry + +Request: + + POST /control/rewrite/delete + + { + domain: "..." + answer: "..." + } + +Response: + + 200 OK