mirror of
https://git.suyu.dev/suyu/website.git
synced 2025-12-21 21:26:05 +01:00
fix ip detection
This commit is contained in:
parent
2a92663299
commit
db626df718
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ export async function POST({ request, getClientAddress }) {
|
|||
},
|
||||
],
|
||||
maxPlayers: body.maxPlayers,
|
||||
ip: `${opts.ip || getClientAddress().split(":").at(-1)}:${body.port}`,
|
||||
ip: `${opts.ip || request.headers.get("CF-Connecting-IP") || request.headers.get("X-Forwarded-For") || getClientAddress().split(":").at(-1)}:${body.port}`,
|
||||
host: user,
|
||||
hasPassword: body.hasPassword || false,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue