So, I'm trying to enable resource sharing in the original context in Django, so I can publish it to an external site, and it is easy to do this when I install
response["Access-Control-Allow-Origin"]="*"
but I want it to check instead whether the source is on the allowed list of sources (essentially to limit it to only allowed specific sites), but I can not find anywhere in the Django request where I can get information about the incident.
I tried using request.META ['HTTP_HOST'] , but that just returns the site you sent the message to. Does anyone know where in the Request object I can get the source of the request?
source
share