Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hexahigh committed Mar 3, 2024
1 parent a168b49 commit 0e7b0f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/routes/f2/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function GET({ url, request }) {
}
];

const ip = request.headers.get('x-forwarded-for') || 'unknown';
const ip = request.headers.get('x-forwarded-for') || request.headers.get('remote_addr') || 'unknown';

// Use ip-api.com to get the latitude and longitude of the IP address
const response = await fetch(`http://ip-api.com/json/${ip}`);
Expand Down

0 comments on commit 0e7b0f9

Please sign in to comment.