jeudi 28 février 2019

Cypress cutting down "X-CSRFToken" header

Noticed that Cypress test runner is cutting out X-CSRFToken from the request header, which causes the request to return 403 Forbidden. Here is the screenshot of headers from manual run and Cypress test run,

Screenshot taken while navigating in Chrome browser: enter image description here

Screenshot taken while running Cypress test: enter image description here

To confirm this, I replayed the request through curl attaching the X-CSRFToken. It worked fine then. How could I handle this while running Cypress tests?

Aucun commentaire:

Enregistrer un commentaire