mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-25 16:36:34 -05:00
Refactor isLocalhost function for readability
Fix lint
This commit is contained in:
@@ -4,10 +4,10 @@ const DANGEROUS_SCHEMES = ["javascript:", "data:", "vbscript:"];
|
||||
|
||||
function isLocalhost(hostname: string): boolean {
|
||||
return (
|
||||
hostname === "localhost"
|
||||
|| hostname === "127.0.0.1"
|
||||
|| hostname === "[::1]"
|
||||
|| hostname.endsWith(".localhost")
|
||||
hostname === "localhost" ||
|
||||
hostname === "127.0.0.1" ||
|
||||
hostname === "[::1]" ||
|
||||
hostname.endsWith(".localhost")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user