You've already forked netbox-docker
mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-11-18 11:20:54 +03:00
Support new API_TOKEN format
Allows configuration the new API_TOKEN_PEPPERS setting from an ENV variable or secret file. Feature request: https://github.com/netbox-community/netbox/issues/20210 Pull request: https://github.com/netbox-community/netbox/pull/20477
This commit is contained in:
@@ -116,6 +116,11 @@ REDIS = {
|
||||
# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-SECRET_KEY
|
||||
SECRET_KEY = _read_secret('secret_key', environ.get('SECRET_KEY', ''))
|
||||
|
||||
API_TOKEN_PEPPERS = {}
|
||||
if api_token_pepper := _read_secret('api_token_pepper_1', environ.get('API_TOKEN_PEPPER_1', '')):
|
||||
API_TOKEN_PEPPERS.update({1: api_token_pepper})
|
||||
|
||||
|
||||
|
||||
#########################
|
||||
# #
|
||||
|
||||
Reference in New Issue
Block a user