[language] more inclusive

This commit is contained in:
Drew Rothstein 2020-07-05 12:58:05 -07:00
parent e67f08c745
commit e893c3eedb
No known key found for this signature in database
GPG Key ID: B206E4F58D62D8E2
3 changed files with 11 additions and 11 deletions

View File

@ -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',
]
```

View File

@ -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$',
]

View File

@ -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)