We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 597fa4d commit 634d4c7Copy full SHA for 634d4c7
1 file changed
web/src/server/free-mode-country.ts
@@ -59,11 +59,10 @@ type FreeModeCountryAccessOptions = {
59
allowLocalhost?: boolean
60
}
61
62
-const LOCALHOST_IPS = new Set(['127.0.0.1', '::1', '::ffff:127.0.0.1'])
+const LOCALHOST_IPS = new Set(['::1', '::ffff:127.0.0.1'])
63
64
-function isLocalhostIp(ip: string | undefined): boolean {
65
- if (!ip) return false
66
- return LOCALHOST_IPS.has(ip) || ip.startsWith('127.')
+function isLocalhostIp(ip: string): boolean {
+ return ip.startsWith('127.') || LOCALHOST_IPS.has(ip)
67
68
69
type ResolvedCountryAccess = Omit<
0 commit comments