Accept X-CSRFTOKEN XAMPP Django

0

Good morning:

I am trying to connect an application in Django with a service in PHP with an xampp as a server. I am sending you the data from a View in Django with a:

return redirect('enlace',{'parametros':parametros})

This generates this header:

Accept  
text/html,application/xhtml+xm…plication/xml;q=0.9,*/*;q=0.8
Accept-Encoding 
gzip, deflate
Accept-Language 
es-MX,es;q=0.8,en-US;q=0.5,en;q=0.3
Access-Control-Request-Headers x-csrftoken,x-requested-with
Access-Control-Request-Method GET
Connection keep-alive
Host localhost
Origin http://127.0.0.1:8000

The fact is that when redirecting to the Apache service, it returns this error:

Solicitud desde otro origen bloqueada: la política de mismo origen impide 
leer el recurso remoto en http://localhost/pruebas/prueba.php (razón: token 
'x-csrftoken' no presente en la cabecera CORS 'Access-Control-Allow-Headers' 
del canal CORS prevuelo).
    
asked by F Delgado 29.01.2018 в 12:19
source

0 answers