Skip to content

Commit b4b865c

Browse files
authored
Merge pull request #22 from linuxserver/update-config
Update config
2 parents 0f52e50 + b98b70b commit b4b865c

File tree

1 file changed

+40
-12
lines changed

1 file changed

+40
-12
lines changed

root/defaults/configuration.py

+40-12
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
# 'SENTINEL_SERVICE': 'netbox',
3434
'PASSWORD': '{{REDIS_PASSWORD}}',
3535
'DATABASE': {{REDIS_DB_TASK}},
36-
'DEFAULT_TIMEOUT': 300,
3736
'SSL': False,
37+
# Set this to True to skip TLS certificate verification
38+
# This can expose the connection to attacks, be careful
39+
# 'INSECURE_SKIP_TLS_VERIFY': False,
3840
},
3941
'caching': {
4042
'HOST': '{{REDIS_HOST}}',
@@ -44,8 +46,10 @@
4446
# 'SENTINEL_SERVICE': 'netbox',
4547
'PASSWORD': '{{REDIS_PASSWORD}}',
4648
'DATABASE': {{REDIS_DB_CACHE}},
47-
'DEFAULT_TIMEOUT': 300,
4849
'SSL': False,
50+
# Set this to True to skip TLS certificate verification
51+
# This can expose the connection to attacks, be careful
52+
# 'INSECURE_SKIP_TLS_VERIFY': False,
4953
}
5054
}
5155

@@ -65,7 +69,7 @@
6569
# Specify one or more name and email address tuples representing NetBox administrators. These people will be notified of
6670
# application errors (assuming correct email settings are provided).
6771
ADMINS = [
68-
# ['John Doe', '[email protected]'],
72+
# ('John Doe', '[email protected]'),
6973
]
7074

7175
# URL schemes that are allowed within links in NetBox
@@ -81,13 +85,10 @@
8185
# Text to include on the login page above the login form. HTML is allowed.
8286
BANNER_LOGIN = ''
8387

84-
# Base URL path if accessing NetBox within a directory. For example, if installed at http://example.com/netbox/, set:
88+
# Base URL path if accessing NetBox within a directory. For example, if installed at https://example.com/netbox/, set:
8589
# BASE_PATH = 'netbox/'
8690
BASE_PATH = '{{BASE_PATH}}'
8791

88-
# Cache timeout in seconds. Set to 0 to dissable caching. Defaults to 900 (15 minutes)
89-
CACHE_TIMEOUT = 900
90-
9192
# Maximum number of days to retain logged changes. Set to 0 to retain changes indefinitely. (Default: 90)
9293
CHANGELOG_RETENTION = 90
9394

@@ -102,6 +103,20 @@
102103
# r'^(https?://)?(\w+\.)?example\.com$',
103104
]
104105

106+
# Specify any custom validators here, as a mapping of model to a list of validators classes. Validators should be
107+
# instances of or inherit from CustomValidator.
108+
# from extras.validators import CustomValidator
109+
CUSTOM_VALIDATORS = {
110+
# 'dcim.site': [
111+
# CustomValidator({
112+
# 'name': {
113+
# 'min_length': 10,
114+
# 'regex': r'\d{3}$',
115+
# }
116+
# })
117+
# ],
118+
}
119+
105120
# Set to True to enable server debugging. WARNING: Debugging introduces a substantial performance penalty and may reveal
106121
# sensitive information about your installation. Only enable debugging while performing testing. Never enable debugging
107122
# on a production system.
@@ -131,6 +146,9 @@
131146
# 'ipam.prefix',
132147
]
133148

149+
# Enable the GraphQL API
150+
GRAPHQL_ENABLED = True
151+
134152
# HTTP proxies NetBox should use when sending outbound HTTP requests (e.g. for webhooks).
135153
# HTTP_PROXIES = {
136154
# 'http': 'http://10.10.1.10:3128',
@@ -145,8 +163,12 @@
145163
# https://docs.djangoproject.com/en/stable/topics/logging/
146164
LOGGING = {}
147165

166+
# Automatically reset the lifetime of a valid session upon each authenticated request. Enables users to remain
167+
# authenticated to NetBox indefinitely.
168+
LOGIN_PERSISTENCE = False
169+
148170
# Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users
149-
# are permitted to access most data in NetBox (excluding secrets) but not make any changes.
171+
# are permitted to access most data in NetBox but not make any changes.
150172
LOGIN_REQUIRED = False
151173

152174
# The length of time (in seconds) for which a user will remain logged into the web UI before being prompted to
@@ -156,6 +178,9 @@
156178
# Setting this to True will display a "maintenance mode" banner at the top of every page.
157179
MAINTENANCE_MODE = False
158180

181+
# The URL to use when mapping physical addresses or GPS coordinates
182+
MAPS_URL = 'https://maps.google.com/?q='
183+
159184
# An API consumer can request an arbitrary number of objects =by appending the "limit" parameter to the URL (e.g.
160185
# "?limit=1000"). This setting defines the maximum limit. Setting it to 0 or None will allow an API consumer to request
161186
# all objects by specifying "?limit=0".
@@ -185,7 +210,7 @@
185210
# NAPALM timeout (in seconds). (Default: 30)
186211
NAPALM_TIMEOUT = 30
187212

188-
# NAPALM optional arguments (see http://napalm.readthedocs.io/en/latest/support/#optional-arguments). Arguments must
213+
# NAPALM optional arguments (see https://napalm.readthedocs.io/en/latest/support/#optional-arguments). Arguments must
189214
# be provided as a dictionary.
190215
NAPALM_ARGS = {}
191216

@@ -220,9 +245,6 @@
220245
REMOTE_AUTH_DEFAULT_GROUPS = {{REMOTE_AUTH_DEFAULT_GROUPS}}
221246
REMOTE_AUTH_DEFAULT_PERMISSIONS = {{REMOTE_AUTH_DEFAULT_PERMISSIONS}}
222247

223-
# This determines how often the GitHub API is called to check the latest release of NetBox. Must be at least 1 hour.
224-
RELEASE_CHECK_TIMEOUT = 24 * 3600
225-
226248
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
227249
# version check or use the URL below to check for release in the official NetBox repository.
228250
RELEASE_CHECK_URL = None
@@ -232,10 +254,16 @@
232254
# this setting is derived from the installed location.
233255
# REPORTS_ROOT = '/opt/netbox/netbox/reports'
234256

257+
# Maximum execution time for background tasks, in seconds.
258+
RQ_DEFAULT_TIMEOUT = 300
259+
235260
# The file path where custom scripts will be stored. A trailing slash is not needed. Note that the default value of
236261
# this setting is derived from the installed location.
237262
SCRIPTS_ROOT = '/config/scripts'
238263

264+
# The name to use for the session cookie.
265+
SESSION_COOKIE_NAME = 'sessionid'
266+
239267
# By default, NetBox will store session data in the database. Alternatively, a file path can be specified here to use
240268
# local file storage instead. (This can be useful for enabling authentication on a standby instance with read-only
241269
# database access.) Note that the user as which NetBox runs must have read and write permissions to this path.

0 commit comments

Comments
 (0)