user agent

This commit is contained in:
aitzol 2023-04-29 11:46:01 +02:00
parent 8cbd4b3775
commit b0499c6593

4
app.py
View File

@ -34,7 +34,7 @@ from libs import flist, slist
from libs.localization import * from libs.localization import *
from libs.helper import tools from libs.helper import tools
import random import random
from user_agents import parse from user_agents import parse as ua_parse
from datetime import datetime from datetime import datetime
BASE_DIR = path.dirname(__file__) BASE_DIR = path.dirname(__file__)
@ -849,7 +849,7 @@ allowed = reg()
def get_dev(): def get_dev():
ua_string = bottle.request.environ.get('HTTP_USER_AGENT') ua_string = bottle.request.environ.get('HTTP_USER_AGENT')
user_agent = parse(ua_string) user_agent = ua_parse(ua_string)
return str(user_agent) return str(user_agent)
def is_trusted_device(conf, user_dn): def is_trusted_device(conf, user_dn):