Update dependency django-cors-headers to v4 #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==2.5.3
->==4.7.0
Release Notes
adamchainz/django-cors-headers (django-cors-headers)
v4.7.0
Compare Source
v4.6.0
Compare Source
v4.5.0
Compare Source
Drop Python 3.8 support.
Support Python 3.13.
v4.4.0
Compare Source
v4.3.1
Compare Source
Fixed ASGI compatibility on Python 3.12.
Thanks to Adrian Capitanu for the report in
Issue #​908 <https://github.com/adamchainz/django-cors-headers/issues/908>
__ and Rooyal inPR #​911 <https://github.com/adamchainz/django-cors-headers/pull/911>
__.v4.3.0
Compare Source
Avoid adding the
access-control-allow-credentials
header to unallowed responses.Thanks to Adam Romanek in
PR #​888 <https://github.com/adamchainz/django-cors-headers/pull/888>
__.Support Django 5.0.
v4.2.0
Compare Source
v4.1.0
Compare Source
v4.0.0
Compare Source
Add
CORS_ALLOW_PRIVATE_NETWORK
setting, which enables support for the Local Network Access draft specification.Thanks to Issac Kelly in
PR #​745 <https://github.com/adamchainz/django-cors-headers/pull/745>
__ and jjurgens0 inPR #​833 <https://github.com/adamchainz/django-cors-headers/pull/833>
__.Remove three headers from the default "accept list":
accept-encoding
,dnt
, andorigin
.These are
Forbidden header names <https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name>
__, which means requests JavaScript can never set them.Consequently, allowing them via CORS has no effect.
Thanks to jub0bs for the report in
Issue #​842 <https://github.com/adamchainz/django-cors-headers/issues/842>
__.Drop the
CORS_REPLACE_HTTPS_REFERER
setting andCorsPostCsrfMiddleware
.Since Django 1.9, the
CSRF_TRUSTED_ORIGINS
setting has been the preferred solution to making CSRF checks pass for CORS requests.The removed setting and middleware only existed as a workaround for Django versions before 1.9.
Add async support to the middleware, reducing overhead on async views.
v3.14.0
Compare Source
Support Django 4.2.
Switch from
urlparse()
tourlsplit()
for URL parsing, reducing the middleware runtime up to 5%.This changes the type passed to
origin_found_in_white_lists()
, so if you have subclassed the middleware to override this method, you should check it is compatible (it most likely is).Thanks to Thibaut Decombe in
PR #​793 <https://github.com/adamchainz/django-cors-headers/pull/793>
__.v3.13.0
Compare Source
Support Python 3.11.
Support Django 4.1.
v3.12.0
Compare Source
v3.11.0
Compare Source
v3.10.1
Compare Source
Prevent a crash when an invalid
Origin
header is sent.Thanks to minusf for the report in
Issue #​701 <https://github.com/adamchainz/django-cors-headers/issues/701>
__.v3.10.0
Compare Source
v3.9.0
Compare Source
v3.8.0
Compare Source
Add type hints.
Stop distributing tests to reduce package size. Tests are not intended to be
run outside of the tox setup in the repository. Repackagers can use GitHub's
tarballs per tag.
v3.7.0
Compare Source
v3.6.0
Compare Source
v3.5.0
Compare Source
Following Django’s example in
Ticket #​31670 <https://code.djangoproject.com/ticket/31670>
__ for replacingthe term “whitelist”, plus an aim to make the setting names more
comprehensible, the following settings have been renamed:
CORS_ORIGIN_WHITELIST
->CORS_ALLOWED_ORIGINS
CORS_ORIGIN_REGEX_WHITELIST
->CORS_ALLOWED_ORIGIN_REGEXES
CORS_ORIGIN_ALLOW_ALL
->CORS_ALLOW_ALL_ORIGINS
The old names will continue to work as aliases, with the new ones taking
precedence.
v3.4.0
Compare Source
v3.3.0
Compare Source
providing_args
argument fromSignal
to prevent a deprecationwarning on Django 3.1.
v3.2.1
Compare Source
pip-licenses
(Issue #​477 <https://github.com/adamchainz/django-cors-headers/issues/477>
__).v3.2.0
Compare Source
__version__
attribute from the package. If you want to inspect theinstalled version, use
importlib.metadata.version("django-cors-headers")
(
docs <https://docs.python.org/3.8/library/importlib.metadata.html#distribution-versions>
__ /backport <https://pypi.org/project/importlib-metadata/>
__).v3.1.1
Compare Source
file://
for origins, which is accidentally sent by someversions of Chrome on Android.
v3.1.0
Compare Source
github.com/ottoyiu/django-cors-headers
togithub.com/adamchainz/django-cors-headers
.v3.0.2
Compare Source
corsheaders.E013
check to make it more obvious how toresolve it.
v3.0.1
Compare Source
CORS_ORIGIN_WHITELIST
check.v3.0.0
Compare Source
CORS_ORIGIN_WHITELIST
now requires URI schemes, and optionally ports.This is part of the CORS specification
(
Section 3.2 <https://tools.ietf.org/html/rfc6454#section-3.2>
_) that wasnot implemented in this library, except from with the
CORS_ORIGIN_REGEX_WHITELIST
setting. It fixes a security issue where theCORS middleware would allow requests between schemes, for example from
insecure
http://
Origins to a securehttps://
site.You will need to update your whitelist to include schemes, for example from
this:
.. code-block:: python
...to this:
.. code-block:: python
Removed the
CORS_MODEL
setting, and associated class. It seems very few,or no users were using it, since there were no bug reports since its move to
abstract in version 2.0.0 (2017-01-07). If you are using this
functionality, you can continue by changing your model to not inherit from
the abstract one, and add a signal handler for
check_request_enabled
thatreads from your model. Note you'll need to handle the move to include schemes
for Origins.
Configuration
📅 Schedule: Branch creation - "every weekend" in timezone US/Eastern, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.