From e893c3eedb2629878da5c0f2e1e17e9014744580 Mon Sep 17 00:00:00 2001 From: Drew Rothstein Date: Sun, 5 Jul 2020 12:58:05 -0700 Subject: [PATCH] [language] more inclusive --- docs/configuration/optional-settings.md | 10 +++++----- netbox/netbox/configuration.example.py | 8 ++++---- netbox/netbox/settings.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/configuration/optional-settings.md b/docs/configuration/optional-settings.md index e938a4125..2c1534ad0 100644 --- a/docs/configuration/optional-settings.md +++ b/docs/configuration/optional-settings.md @@ -72,18 +72,18 @@ The number of days to retain logged changes (object creations, updates, and dele Default: False -If True, cross-origin resource sharing (CORS) requests will be accepted from all origins. If False, a whitelist will be used (see below). +If True, cross-origin resource sharing (CORS) requests will be accepted from all origins. If False, an allowlist will be used (see below). --- -## CORS_ORIGIN_WHITELIST +## CORS_ORIGIN_ALLOWLIST -## CORS_ORIGIN_REGEX_WHITELIST +## CORS_ORIGIN_REGEX_ALLOWLIST -These settings specify a list of origins that are authorized to make cross-site API requests. Use `CORS_ORIGIN_WHITELIST` to define a list of exact hostnames, or `CORS_ORIGIN_REGEX_WHITELIST` to define a set of regular expressions. (These settings have no effect if `CORS_ORIGIN_ALLOW_ALL` is True.) For example: +These settings specify a list of origins that are authorized to make cross-site API requests. Use `CORS_ORIGIN_ALLOWLIST` to define a list of exact hostnames, or `CORS_ORIGIN_REGEX_ALLOWLIST` to define a set of regular expressions. (These settings have no effect if `CORS_ORIGIN_ALLOW_ALL` is True.) For example: ``` -CORS_ORIGIN_WHITELIST = [ +CORS_ORIGIN_ALLOWLIST = [ 'https://example.com', ] ``` diff --git a/netbox/netbox/configuration.example.py b/netbox/netbox/configuration.example.py index bd3b9806c..d547ac56d 100644 --- a/netbox/netbox/configuration.example.py +++ b/netbox/netbox/configuration.example.py @@ -92,13 +92,13 @@ CACHE_TIMEOUT = 900 CHANGELOG_RETENTION = 90 # API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be -# allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_WHITELIST or -# CORS_ORIGIN_REGEX_WHITELIST. For more information, see https://github.com/ottoyiu/django-cors-headers +# allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_ALLOWLIST or +# CORS_ORIGIN_REGEX_ALLOWLIST. For more information, see https://github.com/ottoyiu/django-cors-headers CORS_ORIGIN_ALLOW_ALL = False -CORS_ORIGIN_WHITELIST = [ +CORS_ORIGIN_ALLOWLIST = [ # 'https://hostname.example.com', ] -CORS_ORIGIN_REGEX_WHITELIST = [ +CORS_ORIGIN_REGEX_ALLOWLIST = [ # r'^(https?://)?(\w+\.)?example\.com$', ] diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index dfa0ddfff..1062a2419 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -70,8 +70,8 @@ if BASE_PATH: CACHE_TIMEOUT = getattr(configuration, 'CACHE_TIMEOUT', 900) CHANGELOG_RETENTION = getattr(configuration, 'CHANGELOG_RETENTION', 90) CORS_ORIGIN_ALLOW_ALL = getattr(configuration, 'CORS_ORIGIN_ALLOW_ALL', False) -CORS_ORIGIN_REGEX_WHITELIST = getattr(configuration, 'CORS_ORIGIN_REGEX_WHITELIST', []) -CORS_ORIGIN_WHITELIST = getattr(configuration, 'CORS_ORIGIN_WHITELIST', []) +CORS_ORIGIN_REGEX_ALLOWLIST = getattr(configuration, 'CORS_ORIGIN_REGEX_ALLOWLIST', []) +CORS_ORIGIN_ALLOWLIST = getattr(configuration, 'CORS_ORIGIN_ALLOWLIST', []) DATE_FORMAT = getattr(configuration, 'DATE_FORMAT', 'N j, Y') DATETIME_FORMAT = getattr(configuration, 'DATETIME_FORMAT', 'N j, Y g:i a') DEBUG = getattr(configuration, 'DEBUG', False)