Skip to content

Commit 17d94b8

Browse files
authored
Remove client IP address validation logic
Removed client IP address checking logic from the REST API.
1 parent ebde25f commit 17d94b8

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

adminforth/modules/restApi.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -382,16 +382,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
382382
if (username === 'adminforth') {
383383
defaultUserExists = true;
384384
}
385-
386-
// getting client ip address (if null - ip definetely is private, if not null - check if it is private)
387-
const clientIp = this.adminforth.auth.getClientIp(response.getHeaders?.() || {});
388-
let isPrivateIP = true;
389-
390-
if (clientIp) {
391-
// ip is not null, so we need to make sure that it is not private
392-
isPrivateIP = is_ip_private(clientIp);
393-
}
394-
385+
395386
const publicPart = {
396387
brandName: this.adminforth.config.customization.brandName,
397388
usernameFieldName: usernameColumn.label,
@@ -1593,4 +1584,4 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
15931584
});
15941585

15951586
}
1596-
}
1587+
}

0 commit comments

Comments
 (0)