Audit changes.
This commit is contained in:
@@ -19,7 +19,7 @@ func (a *App) setCookie(w http.ResponseWriter, name, value string) {
|
|||||||
Secure: !a.insecure,
|
Secure: !a.insecure,
|
||||||
SameSite: http.SameSiteStrictMode,
|
SameSite: http.SameSiteStrictMode,
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
MaxAge: 86400 * 365 * 10,
|
MaxAge: 86400 * 21,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,11 +55,13 @@ func receiver(selfVPNIP netip.Addr, limiters []*ratelimiter.Limiter, ch chan<- P
|
|||||||
}
|
}
|
||||||
|
|
||||||
packet := unmarshal(buf[:n])
|
packet := unmarshal(buf[:n])
|
||||||
if err := limiters[packet.PeerIP].Limit(); err != nil {
|
|
||||||
|
if packet.PeerIP == selfIP {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if packet.PeerIP == selfIP {
|
if err := limiters[packet.PeerIP].Limit(); err != nil {
|
||||||
|
log.Printf("Rate limited packet from peer IP %d.", packet.PeerIP)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user