21👍
✅
Just change the SESSION_COOKIE_NAME
. The SESSION_COOKIE_DOMAIN
doesn’t support port numbers afaik. So they are all the same for your apps.
3👍
Another solution that doesn’t require hard-coding different cookie names for each site is to write a middleware that changes the cookie name based on the port the request came in on.
Here’s a simple version (just a few lines of code).
- Installing Django with pip
- Django CORS Access-Control-Allow-Origin missing
- Django.db.models.loading.get_model vs. importing
- Django-rest-framwork got AttributeError when attempting to get a value for field
Source:stackexchange.com