ratelimits.

This commit is contained in:
fiatjaf
2024-05-12 20:37:00 -03:00
parent 848e76c664
commit f8afb51ee9
9 changed files with 146 additions and 8 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"github.com/nbd-wtf/go-nostr"
"github.com/sebest/xff"
)
const (
@@ -31,7 +30,7 @@ func GetAuthed(ctx context.Context) string {
}
func GetIP(ctx context.Context) string {
return xff.GetRemoteAddr(GetConnection(ctx).Request)
return GetIPFromRequest(GetConnection(ctx).Request)
}
func GetSubscriptionID(ctx context.Context) string {