mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-04 08:30:39 +00:00
fix: more clean ip (#2864)
This commit is contained in:
@@ -373,7 +373,12 @@ export class AuthController extends PuterController {
|
||||
const validateEvent = {
|
||||
req,
|
||||
data: body,
|
||||
ip: req.ip || req.socket?.remoteAddress || null,
|
||||
ip:
|
||||
req.headers?.['x-forwarded-for'] ||
|
||||
req.connection?.remoteAddress ||
|
||||
req.ip ||
|
||||
req.socket?.remoteAddress ||
|
||||
null,
|
||||
email: body.email,
|
||||
allow: true,
|
||||
no_temp_user: false,
|
||||
|
||||
@@ -322,6 +322,13 @@ export class OIDCService extends PuterService {
|
||||
const validateEvent = {
|
||||
req,
|
||||
data: { username, email: claims.email ?? '' },
|
||||
ip:
|
||||
(req?.headers?.['x-forwarded-for'] as string | undefined) ||
|
||||
req?.connection?.remoteAddress ||
|
||||
req?.ip ||
|
||||
req?.socket?.remoteAddress ||
|
||||
null,
|
||||
email: claims.email ?? '',
|
||||
allow: true,
|
||||
no_temp_user: false,
|
||||
requires_email_confirmation: false,
|
||||
|
||||
Reference in New Issue
Block a user