Skip to content

Commit 4e1dac1

Browse files
committed
login-modal.jsx: Add regex for local IPs
Add regex `/^127|^0/` to check for localhost Closes coala#179
1 parent 13a7301 commit 4e1dac1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/login-modal.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Login extends Component {
4242
let tld = hostname.split('.').slice(-2).join('.');
4343
if (tld == 'github.io') return null;
4444
if (tld == 'netlify.com') return null;
45-
if (tld == 'localhost') return null;
45+
if (tld == 'localhost' || hostname.match(/^127|^0/)) return null;
4646
return 'https://' + hostname + '/api/v3';
4747

4848
})();

0 commit comments

Comments
 (0)