File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -382,8 +382,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
382382 if ( username === 'adminforth' ) {
383383 defaultUserExists = true ;
384384 }
385- const clientIp = this . adminforth . auth . getClientIp ( response . getHeaders ?.( ) || { } ) ;
386- const isPrivateIP = is_ip_private ( clientIp ) ;
387385
388386 const publicPart = {
389387 brandName : this . adminforth . config . customization . brandName ,
@@ -414,7 +412,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
414412 userFullnameField : this . adminforth . config . auth . userFullNameField ,
415413 settingPages : settingPages ,
416414 defaultUserExists : defaultUserExists ,
417- isPrivateIP : isPrivateIP ,
418415 }
419416
420417 // translate menu labels
Original file line number Diff line number Diff line change 5151 </div >
5252 </div >
5353
54- <div v-if =" coreStore.config.defaultUserExists && !coreStore.config.isPrivateIP " class =" p-4 mb-4 text-white rounded-lg bg-red-700/80 fill-white text-sm" >
54+ <div v-if =" coreStore.config.defaultUserExists && !isLocalhost " class =" p-4 mb-4 text-white rounded-lg bg-red-700/80 fill-white text-sm" >
5555 <IconExclamationCircleOutline class =" inline-block align-text-bottom mr-0,5 w-5 h-5" />
5656 Default user <strong >"adminforth"</strong > detected. Delete it and create your own account.
5757 </div >
@@ -307,6 +307,8 @@ import type { AnnouncementBadgeResponse } from '@/types/Common';
307307import { useAdminforth } from ' @/adminforth' ;
308308import { IconExclamationCircleOutline } from ' @iconify-prerendered/vue-flowbite' ;
309309
310+ const isLocalhost = window .location .hostname === ' localhost' || window .location .hostname === ' 127.0.0.1' || window .location .hostname === ' ::1' ;
311+
310312const { menu } = useAdminforth ();
311313
312314interface Props {
You can’t perform that action at this time.
0 commit comments