File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed 
api/src/unraid-api/unraid-file-modifier/modifications Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,13 @@ export default class HostsModification extends FileModification {
1414    protected  async  generatePatch ( overridePath ?: string ) : Promise < string >  { 
1515        const  originalContent  =  await  readFile ( this . filePath ,  'utf8' ) ; 
1616
17+         // Use a case-insensitive word-boundary regex so the hostname must appear as an independent token 
18+         // prevents partial string & look-alike conflicts such as "keys.lime-technology.com.example.com" 
19+         const  hostPattern  =  / \b k e y s \. l i m e - t e c h n o l o g y \. c o m \b / i; 
20+ 
1721        const  newContent  =  originalContent 
1822            . split ( '\n' ) 
19-             . filter ( ( line )  =>  ! line . includes ( 'keys.lime-technology.com' ) ) 
23+             . filter ( ( line )  =>  ! hostPattern . test ( line ) ) 
2024            . join ( '\n' ) ; 
2125
2226        return  this . createPatchWithDiff ( overridePath  ??  this . filePath ,  originalContent ,  newContent ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments