Document SRV, CF*REDIRECT, and note where docs are needed. (#346)

This commit is contained in:
Tom Limoncelli 2018-03-22 09:30:09 -04:00 committed by GitHub
parent 899100b7b3
commit 511d10efc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 93 additions and 5 deletions

View 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.

View 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 %}

View file

@ -0,0 +1,9 @@
---
name: FRAME
parameters:
- name
- target
- modifiers...
---
Documentation needed.

View file

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

View 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 %}

View file

@ -0,0 +1,8 @@
---
name: URL
parameters:
- name
- modifiers...
---
Documentation needed.

View file

@ -0,0 +1,8 @@
---
name: URL301
parameters:
- name
- modifiers...
---
Documentation needed.