mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 08:44:29 +00:00
docs: update comments for shouldRewriteUA
This commit is contained in:
parent
0b011ca992
commit
43d95183d9
@ -15,10 +15,8 @@ type RewriteResult struct {
|
||||
InCache bool // Whether destination address is in cache
|
||||
}
|
||||
|
||||
// shouldRewriteUA checks if the given User-Agent should be rewritten
|
||||
// Returns true if UA should be rewritten (not in whitelist and matches regex pattern)
|
||||
// shouldRewriteUA determines if the User-Agent should be rewritten
|
||||
func (r *Rewriter) shouldRewriteUA(srcAddr, dstAddr string, ua string) bool {
|
||||
// If no pattern specified, rewrite all non-whitelist UAs
|
||||
if r.pattern == "" {
|
||||
return true
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user