1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 07:29:02 +02:00

Update virtual hosting example to use guard::Host instead of guard::Header (#318)

This commit is contained in:
Olof Kasselstrand
2023-03-14 14:45:18 +01:00
committed by GitHub
parent 5fa564fd4e
commit 77920d65fe
2 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ In the above example, the `show_users` route will have an effective route patter
You can think of a guard as a simple function that accepts a _request_ object reference and returns _true_ or _false_. Formally, a guard is any object that implements the [`Guard`][guardtrait] trait. Actix Web provides several guards. You can check the [functions section][guardfuncs] of the API docs.
One of the provided guards is [`Header`][guardheader]. It can be used as a filter based on request header information.
One of the provided guards is [`Host`][guardheader]. It can be used as a filter based on request header information.
<CodeBlock example="application" file="vh.rs" section="vh" />