jazzband / django-waffle

A feature flipper for Django
https://waffle.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 258 forks source link

Set cookie in cross-origin requests #430

Open EllenMHuffman opened 2 years ago

EllenMHuffman commented 2 years ago

The WaffleMiddleware sets a cookie on the response, but it does not support the domain parameter. The middleware should allow customizing this value so that waffle cookies can be used in cross-origin requests.

The middleware should use SESSION_COOKIE_DOMAIN from the Django settings. Alternatively, Waffle could introduce its own setting WAFFLE_SESSION_COOKIE_DOMAIN.