* Added an option to remove authentication * Updated README to document disabling authentication Co-authored-by: Przemek Dragańczuk <admin@draganczuk.tk>
This commit is contained in:
committed by
GitHub
parent
8734ba63d9
commit
a26e3fb98f
@@ -27,4 +27,14 @@ public class Utils {
|
||||
return PATTERN.matcher(shortUrl)
|
||||
.matches();
|
||||
}
|
||||
|
||||
public static boolean isPasswordEnabled(){
|
||||
String disablePasswordEnv = System.getenv("INSECURE_DISABLE_PASSWORD");
|
||||
|
||||
if(disablePasswordEnv != null && disablePasswordEnv.equals("I_KNOW_ITS_BAD")){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user