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

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hexahigh committed Mar 3, 2024
1 parent d8a55d0 commit a168b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/routes/f2/+server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { endpoint } from '$lib/conf.js';

export async function GET({ url, headers }) {
export async function GET({ url, request }) {
// Extract the HASH and the file extension from the url
const hash = url.searchParams.get('h') || '0';
const ext = url.searchParams.get('e') || 'bin';
Expand All @@ -15,7 +15,7 @@ export async function GET({ url, headers }) {
}
];

const ip = headers.get('x-forwarded-for') || 'unknown';
const ip = request.headers.get('x-forwarded-for') || '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 a168b49

Please sign in to comment.