Discourse admin login throws 403 ["BAD CSRF"] error

Thanks Matt,

To eliminate the network and traffic influence, what I did earlier today was:

  1. Get into the docker container with command docker exec -it app /bin/bash
  2. Do curl call to localhost:3000 to get a csrf token:
    curl -X GET http://localhost:3000/session/csrf -H ‘X-Requested-With: XMLHttpRequest’.
  3. 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.