Skip to content

Commit b865790

Browse files
committed
docs: use fastify.example in documentation
1 parent 7a11eea commit b865790

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

docs/Guides/Plugins-Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ function dbPlugin (fastify, opts, done) {
412412
})
413413
}
414414

415-
fastify.register(fp(dbPlugin), { url: 'https://example.com' })
415+
fastify.register(fp(dbPlugin), { url: 'https://fastify.example' })
416416
fastify.register(require('your-plugin'), parent => {
417417
return { connection: parent.db, otherOption: 'foo-bar' }
418418
})

docs/Guides/Recommendations.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ frontend proxy-ssl
112112
113113
# Here we define rule pairs to handle static resources. Any incoming request
114114
# that has a path starting with `/static`, e.g.
115-
# `https://one.example.com/static/foo.jpeg`, will be redirected to the
115+
# `https://one.fastify.example/static/foo.jpeg`, will be redirected to the
116116
# static resources server.
117117
acl is_static path -i -m beg /static
118118
use_backend static-backend if is_static
@@ -122,10 +122,10 @@ frontend proxy-ssl
122122
# the incoming hostname and define a boolean indicating if it is a match.
123123
# The `use_backend` line is used to direct the traffic if the boolean is
124124
# true.
125-
acl example1 hdr_sub(Host) one.example.com
125+
acl example1 hdr_sub(Host) one.fastify.example
126126
use_backend example1-backend if example1
127127
128-
acl example2 hdr_sub(Host) two.example.com
128+
acl example2 hdr_sub(Host) two.fastify.example
129129
use_backend example2-backend if example2
130130
131131
# Finally, we have a fallback redirect if none of the requested hosts
@@ -144,14 +144,14 @@ backend default-server
144144
# requests over TLS, but that is outside the scope of this example.
145145
server server1 10.10.10.2:80
146146
147-
# This backend configuration will serve requests for `https://one.example.com`
147+
# This backend configuration will serve requests for `https://one.fastify.example`
148148
# by proxying requests to three backend servers in a round-robin manner.
149149
backend example1-backend
150150
server example1-1 10.10.11.2:80
151151
server example1-2 10.10.11.2:80
152152
server example2-2 10.10.11.3:80
153153
154-
# This one serves requests for `https://two.example.com`
154+
# This one serves requests for `https://two.fastify.example`
155155
backend example2-backend
156156
server example2-1 10.10.12.2:80
157157
server example2-2 10.10.12.2:80

docs/Reference/Routes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,17 +708,17 @@ specified as strings for exact matches or RegExps for arbitrary host matching.
708708
fastify.route({
709709
method: 'GET',
710710
url: '/',
711-
constraints: { host: 'auth.fastify.dev' },
711+
constraints: { host: 'auth.fastify.example' },
712712
handler: function (request, reply) {
713-
reply.send('hello world from auth.fastify.dev')
713+
reply.send('hello world from auth.fastify.example')
714714
}
715715
})
716716
717717
fastify.inject({
718718
method: 'GET',
719719
url: '/',
720720
headers: {
721-
'Host': 'example.com'
721+
'Host': 'fastify.example'
722722
}
723723
}, (err, res) => {
724724
// 404 because the host doesn't match the constraint
@@ -742,7 +742,7 @@ matching wildcard subdomains (or any other pattern):
742742
fastify.route({
743743
method: 'GET',
744744
url: '/',
745-
constraints: { host: /.*\.fastify\.dev/ }, // will match any subdomain of fastify.dev
745+
constraints: { host: /.*\.fastify\.example/ }, // will match any subdomain of fastify.dev
746746
handler: function (request, reply) {
747747
reply.send('hello world from ' + request.headers.host)
748748
}

docs/Reference/Validation-and-Serialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ keyword. Here is an overview of how references work:
6767

6868
```js
6969
fastify.addSchema({
70-
$id: 'http://example.com/',
70+
$id: 'http://fastify.example/',
7171
type: 'object',
7272
properties: {
7373
hello: { type: 'string' }
@@ -79,7 +79,7 @@ fastify.post('/', {
7979
schema: {
8080
body: {
8181
type: 'array',
82-
items: { $ref: 'http://example.com#/properties/hello' }
82+
items: { $ref: 'http://fastify.example#/properties/hello' }
8383
}
8484
}
8585
})

0 commit comments

Comments
 (0)