Add a "commented SPF record" example.

This commit is contained in:
Tom Limoncelli 2017-03-27 17:31:23 -04:00
parent bf664a9f44
commit b0333f3244

View file

@ -59,7 +59,7 @@ D('example.com', REG, DnsProvider('R53'),
) )
{% endhighlight %} {% endhighlight %}
## Macro to group repeated records ## Macro to for repeated records
{% highlight javascript %} {% highlight javascript %}
@ -74,17 +74,19 @@ var GOOGLE_APPS_RECORDS = [
CNAME('mail', 'ghs.googlehosted.com.'), CNAME('mail', 'ghs.googlehosted.com.'),
CNAME('groups', 'ghs.googlehosted.com.'), CNAME('groups', 'ghs.googlehosted.com.'),
CNAME('sites', 'ghs.googlehosted.com.'), CNAME('sites', 'ghs.googlehosted.com.'),
CNAME('start', 'ghs.googlehosted.com.'),
] ]
D('example.com', REG, DnsProvider('R53'), D('example.com', REG, DnsProvider('R53'),
GOOGLE_APPS_RECORDS, GOOGLE_APPS_RECORDS,
A('@', '1.2.3.4') A('@', '1.2.3.4')
) )
{% endhighlight %} {% endhighlight %}
## Add comments along complex SPF records ## Add comments along complex SPF records
You can't normally put comments in the middle of a string, You normally can't put comments in the middle of a string,
but with a little bit of creativity you can document but with a little bit of creativity you can document
each element of an SPF record this way. each element of an SPF record this way.
@ -102,6 +104,10 @@ var SPF_RECORDS = TXT('@', [
'~all' '~all'
].join(' ')); ].join(' '));
D('example.com', REG, DnsProvider('R53'),
SPF_RECORDS,
)
{% endhighlight %} {% endhighlight %}
## Dual DNS Providers ## Dual DNS Providers