There is a project with two subdomains: forum.site.com and games.site.com when sending ajax post request from one subdomain to another server, it rejects as sessionid and csrf token from cookies will not be sent. Within one domain the code is working properly.
On the subdomains is a useful utility for me, I would like to use them without duplicating urls, if this is not possible, then tell me the correct architecture
SESSION_COOKIE_DOMAIN = 'site.com'
CSRF_COOKIE_DOMAIN = 'site.com'
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_TRUSTED_ORIGINS = ['games.site.com', 'forum.site.com']
MIDDLEWARE = [