Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/actix/examples
/ check
Method
check
guards/src/main.rs:17–22 ·
view source on GitHub ↗
(&self, ctx: &GuardContext<'_>)
Source
from the content-addressed store, hash-verified
15
16
impl Guard for ApiGuard {
17
fn check(&self, ctx: &GuardContext<'_>) -> bool {
18
ctx.head()
19
.headers()
20
.get(
"Accept-Version"
)
21
.is_some_and(|hv| hv.as_bytes() == b
"1"
)
22
}
23
}
24
25
#[get(
"/hello"
)]
Callers
nothing calls this directly
Calls
1
get
Method · 0.80
Tested by
no test coverage detected