init
This commit is contained in:
@@ -53,6 +53,7 @@ INSTALLED_APPS = [
|
||||
'corsheaders',
|
||||
'channels',
|
||||
'django_filters',
|
||||
'rest_framework_simplejwt',
|
||||
|
||||
'user',
|
||||
'api',
|
||||
@@ -220,6 +221,7 @@ REST_FRAMEWORK = {
|
||||
"DEFAULT_AUTHENTICATION_CLASSES": [
|
||||
"rest_framework.authentication.SessionAuthentication",
|
||||
"rest_framework.authentication.BasicAuthentication",
|
||||
'rest_framework_simplejwt.authentication.JWTAuthentication',
|
||||
],
|
||||
"DEFAULT_RENDERER_CLASSES": [
|
||||
"rest_framework.renderers.JSONRenderer",
|
||||
@@ -227,6 +229,19 @@ REST_FRAMEWORK = {
|
||||
]
|
||||
}
|
||||
|
||||
SIMPLE_JWT = {
|
||||
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=30),
|
||||
'REFRESH_TOKEN_LIFETIME': timedelta(days=1),
|
||||
'ROTATE_REFRESH_TOKENS': False,
|
||||
'BLACKLIST_AFTER_ROTATION': True,
|
||||
'ALGORITHM': 'HS256',
|
||||
'SIGNING_KEY': SECRET_KEY,
|
||||
'VERIFYING_KEY': None,
|
||||
'AUTH_HEADER_TYPES': ('Bearer',),
|
||||
'USER_ID_FIELD': 'id',
|
||||
'USER_ID_CLAIM': 'user_id',
|
||||
}
|
||||
|
||||
# Torrent related
|
||||
DOWNLOAD_BASE_DIR = Path("/transmission/downloads/complete")
|
||||
NGINX_ACCEL_BASE = "/dl/"
|
||||
|
||||
Reference in New Issue
Block a user