Update security.md

This commit is contained in:
mr1716 2025-02-05 07:04:24 -05:00 committed by GitHub
parent 260adfc9e7
commit e4e537b69f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,17 +55,18 @@ If True, cross-origin resource sharing (CORS) requests will be accepted from all
## CORS_ORIGIN_WHITELIST ## CORS_ORIGIN_WHITELIST
## CORS_ORIGIN_REGEX_WHITELIST This setting specifies a list of hostnames that are allowed to make cross-site API requests. Please note that this setting will 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_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:
```python ```python
CORS_ORIGIN_WHITELIST = [ CORS_ORIGIN_WHITELIST = [
'https://example.com', 'https://example.com',
] ]
``` ```
---
## CORS_ORIGIN_REGEX_WHITELIST
These settings specify a list of origins that are authorized to make cross-site API requests. This value, `CORS_ORIGIN_REGEX_WHITELIST`, is used to define a set of regular
expressions. (These settings have no effect if `CORS_ORIGIN_ALLOW_ALL` is True.)
--- ---