Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
0188090a
Commit
0188090a
authored
Aug 03, 2022
by
Chris O'Haver
Committed by
GitHub
Aug 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CNAME example to README (#5537)
Signed-off-by:
Chris O'Haver
<
cohaver@infoblox.com
>
parent
cdf17bca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
plugin/template/README.md
plugin/template/README.md
+16
-0
No files found.
plugin/template/README.md
View file @
0188090a
...
...
@@ -242,6 +242,22 @@ Named capture groups can be used to template one response for multiple patterns.
}
~~~
### Fabricate a CNAME
This example responds with a CNAME to
`google.com`
for any DNS query made exactly for
`foogle.com`
.
The answer will also contain a record for
`google.com`
if the upstream nameserver can return a record for it of the
requested type.
~~~
corefile
. {
template IN ANY foogle.com {
match "^foogle\.com\.$"
answer "foogle.com 60 IN CNAME google.com"
}
forward . 8.8.8.8
}
~~~
## Also see
*
[
Go regexp
](
https://golang.org/pkg/regexp/
)
for details about the regex implementation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment