+ doc: add Rewrites section

This commit is contained in:
Simon Zolin 2019-07-18 19:16:04 +03:00
parent b66e370ffc
commit 0c2459b51b
1 changed files with 61 additions and 0 deletions

View File

@ -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