feat(identity): register accounts and resend verification mail

This commit is contained in:
shira committed 2026-10-06 23:59:51 +03:00
1 parent 5e202ac972
commit 4436f626a3
55 files changed
+3227 -88

No files matched your search

@@ -73,8 +73,10 @@ func ClientIP(trusted []netip.Prefix) func(http.Handler) http.Handler {
// ClientAddr returns the client address that the ClientIP middleware stored.
// The second result is false when the middleware did not run or the peer
// address was not an IP address; a caller must then fail closed, for example
// by sharing one limiter bucket, instead of skipping its limit.
// address was not an IP address. A caller then skips its per-client limit
// and keeps its other limits: a shared "unknown" bucket would let one client
// lock out everyone, which is the worse failure than a missing per-client
// brake. The registration handler does this and counts nothing for it.
func ClientAddr(ctx context.Context) (netip.Addr, bool) {
addr, ok := ctx.Value(clientAddrKey{}).(netip.Addr)
return addr, ok && addr.IsValid()