Thanks Matt,
To eliminate the network and traffic influence, what I did earlier today was:
- Get into the docker container with command docker exec -it app /bin/bash
- Do curl call to localhost:3000 to get a csrf token:
curl -X GET http://localhost:3000/session/csrf -H ‘X-Requested-With: XMLHttpRequest’. - Then call a login request with the token got:
curl -X POST http://localhost:3000/session -H ‘Content-Type: application/x-www-form-urlencoded’ -H ‘X-CSRF-Token: qh4CYDsFXIlZ70MJ7bz6FLHxrKRR0zVQoKLOPDyKeXJbkzV/+NEk3JTCaEDFcZ/vzAZa3MhKuETcquJ9zarTKw==’ -H ‘X-Requested-With: XMLHttpRequest’ -d ‘login=test&password=testpassword’
Still got 403 bad csrf error with that.