Skip to content

Commit 68f8e39

Browse files
committed
fix(My IP): use https://www.ipify.org/
1 parent 81258f6 commit 68f8e39

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/tools/my-ip/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineTool } from '../tool';
44
export const tool = defineTool({
55
name: 'My IP Address',
66
path: '/my-ip',
7-
description: 'Get your client IP Address (IPv4/6) using https://getjsonip.com/',
7+
description: 'Get your client IP Address (IPv4/6) using https://www.ipify.org/',
88
keywords: ['my', 'client', 'ip'],
99
component: () => import('./my-ip.vue'),
1010
icon: World,

src/tools/my-ip/my-ip.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { useCopy } from '@/composable/copy';
44
55
const [clientIP, refreshClientIP] = computedRefreshableAsync(async () => {
66
try {
7-
return (await (await fetch('https://jsonip.com', { mode: 'cors' })).json()).ip?.toString();
7+
return (await (await fetch('https://api64.ipify.org?format=json', {
8+
mode: 'cors',
9+
})).json()).ip?.toString();
810
}
911
catch (e: any) {
1012
return e.toString();

0 commit comments

Comments
 (0)