root: add method to get install_id without django being loaded (#5755)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		@ -15,7 +15,7 @@ from authentik import get_full_version
 | 
			
		||||
from authentik.lib.config import CONFIG
 | 
			
		||||
from authentik.lib.utils.http import get_http_session
 | 
			
		||||
from authentik.lib.utils.reflection import get_env
 | 
			
		||||
from authentik.root.install_id import get_install_id
 | 
			
		||||
from authentik.root.install_id import get_install_id_raw
 | 
			
		||||
from lifecycle.worker import DjangoUvicornWorker
 | 
			
		||||
 | 
			
		||||
if TYPE_CHECKING:
 | 
			
		||||
@ -149,7 +149,7 @@ if not CONFIG.y_bool("disable_startup_analytics", False):
 | 
			
		||||
                    ),
 | 
			
		||||
                },
 | 
			
		||||
                headers={
 | 
			
		||||
                    "User-Agent": sha512(get_install_id().encode("ascii")).hexdigest()[:16],
 | 
			
		||||
                    "User-Agent": sha512(get_install_id_raw().encode("ascii")).hexdigest()[:16],
 | 
			
		||||
                    "Content-Type": "application/json",
 | 
			
		||||
                },
 | 
			
		||||
                timeout=5,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user