mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 21:54:59 +08:00
Document SRV, CF*REDIRECT, and note where docs are needed. (#346)
This commit is contained in:
parent
899100b7b3
commit
511d10efc9
7 changed files with 93 additions and 5 deletions
16
docs/_functions/domain/CF_REDIRECT.md
Normal file
16
docs/_functions/domain/CF_REDIRECT.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
name: CF_REDIRECT
|
||||
parameters:
|
||||
- destination
|
||||
- modifiers...
|
||||
---
|
||||
|
||||
`CF_REDIRECT` is the same as `CF_TEMP_REDIRECT` but generates a
|
||||
http 301 redirect (permanent redirect) instead of a temporary
|
||||
redirect.
|
||||
|
||||
These redirects are cached by browsers forever, usually ignoring
|
||||
any TTLs or other cache invalidation techniques. It should be
|
||||
used with great care. We suggest using a `CF_TEMP_REDIRECT`
|
||||
initially, then changing to a `CF_REDIRECT` only after sufficient
|
||||
time has elapsed to prove this is what you really want.
|
22
docs/_functions/domain/CF_TEMP_REDIRECT.md
Normal file
22
docs/_functions/domain/CF_TEMP_REDIRECT.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
name: CF_TEMP_REDIRECT
|
||||
parameters:
|
||||
- destination
|
||||
- modifiers...
|
||||
---
|
||||
|
||||
`CF_REDIRECT` uses CloudFlare-specific features ("page rules") to
|
||||
generate an HTTP 301 redirect.
|
||||
|
||||
WARNING: If the domain has other pagerules in place, they may be
|
||||
deleted. At this time this feature is best used on bare domains
|
||||
that need to redirect to another domain, perhaps with wildcard
|
||||
substitutions.
|
||||
|
||||
{% include startExample.html %}
|
||||
{% highlight js %}
|
||||
D("foo.com", .... ,
|
||||
CF_TEMP_REDIRECT("example.mydomain.com/*", "https://otherplace.yourdomain.com/$1"),
|
||||
);
|
||||
{%endhighlight%}
|
||||
{% include endExample.html %}
|
9
docs/_functions/domain/FRAME.md
Normal file
9
docs/_functions/domain/FRAME.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
name: FRAME
|
||||
parameters:
|
||||
- name
|
||||
- target
|
||||
- modifiers...
|
||||
---
|
||||
|
||||
Documentation needed.
|
|
@ -3,14 +3,12 @@ name: IMPORT_TRANSFORM
|
|||
parameters:
|
||||
- transform table
|
||||
- domain
|
||||
- ttl
|
||||
- modifiers...
|
||||
---
|
||||
|
||||
Don't use this feature. It was added for a very specific situation. Bugs
|
||||
and feature requests from outside that situation will be rejected.
|
||||
Don't use this feature. It was added for a very specific situation at Stack Overflow.
|
||||
|
||||
IMPORT_TRANSFORM adds to the domain all the records from another
|
||||
`IMPORT_TRANSFORM` adds to the domain all the records from another
|
||||
domain, after making certain transformations and resetting the TTL.
|
||||
|
||||
Example:
|
||||
|
@ -23,7 +21,7 @@ the IP address to be based on 123.123.123.100 (i.e. .113 or .114).
|
|||
|
||||
You wouldn't want to maintain bar.com manually, would you? It would
|
||||
be very error prone. Therefore instead you maintain foo.com and
|
||||
let IMPORT_TRANSFORM automatically generate bar.com.
|
||||
let `IMPORT_TRANSFORM` automatically generate bar.com.
|
||||
|
||||
{% include startExample.html %}
|
||||
{% highlight html %}
|
||||
|
|
27
docs/_functions/domain/SRV.md
Normal file
27
docs/_functions/domain/SRV.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
name: SRV
|
||||
parameters:
|
||||
- name
|
||||
- priority
|
||||
- weight
|
||||
- port
|
||||
- target
|
||||
- modifiers...
|
||||
---
|
||||
|
||||
`SRV` adds a `SRV` record to a domain. The name should be the relative label for the record.
|
||||
|
||||
Priority, weight, and port are ints.
|
||||
|
||||
{% include startExample.html %}
|
||||
{% highlight js %}
|
||||
|
||||
D("example.com", REGISTRAR, DnsProvider("GCLOUD"),
|
||||
// Create SRV records for a a SIP service:
|
||||
// pr w port, target
|
||||
SRV('_sip._tcp', 10, 60, 5060, 'bigbox.example.tld.'),
|
||||
SRV('_sip._tcp', 10, 20, 5060, 'smallbox1.example.tld.'),
|
||||
);
|
||||
|
||||
{%endhighlight%}
|
||||
{% include endExample.html %}
|
8
docs/_functions/domain/URL.md
Normal file
8
docs/_functions/domain/URL.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: URL
|
||||
parameters:
|
||||
- name
|
||||
- modifiers...
|
||||
---
|
||||
|
||||
Documentation needed.
|
8
docs/_functions/domain/URL301.md
Normal file
8
docs/_functions/domain/URL301.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: URL301
|
||||
parameters:
|
||||
- name
|
||||
- modifiers...
|
||||
---
|
||||
|
||||
Documentation needed.
|
Loading…
Add table
Reference in a new issue