j2inn / haystack-nclient

Project Haystack client network TypeScript library
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

Fixed CSRF recovery and added Configurable CSRF Attest Headers #15

Closed EliteScientist closed 2 years ago

EliteScientist commented 2 years ago

Configurable CSRF Headers:

  1. Configurable token request path
  2. Configurable token header key
  3. Configurable token request result header key

Changed "addAttestKey" check to "hasAttestKey" to test if the request currently has an attest key. This enables recovery in the case the attest key was passed in the headers but was invalid.