MCPcopy Create free account
hub / github.com/kataras/iris / IsScript

Method IsScript

context/context.go:1206–1209  ·  view source on GitHub ↗

IsScript reports whether a client is a script.

()

Source from the content-addressed store, hash-verified

1204
1205// IsScript reports whether a client is a script.
1206func (ctx *Context) IsScript() bool {
1207 s := strings.ToLower(ctx.GetHeader("User-Agent"))
1208 return isScriptRegex.MatchString(s)
1209}
1210
1211// IsSSL reports whether the client is running under HTTPS SSL.
1212//

Callers

nothing calls this directly

Calls 2

GetHeaderMethod · 0.95
MatchStringMethod · 0.80

Tested by

no test coverage detected