manchenkoff / nuxt-auth-sanctum

Nuxt module for Laravel Sanctum authentication
https://manchenkoff.gitbook.io/nuxt-auth-sanctum/
MIT License
173 stars 21 forks source link

fix: use normalized ofetch headers #192

Closed manchenkoff closed 1 month ago

manchenkoff commented 1 month ago

Is your PR related to a specific issue/feature? Please describe and mention issues.

After ofetch 1.4.0 release that includes https://github.com/unjs/ofetch/pull/436, nuxt-auth-sanctum interceptors stopped working properly due to the usage of HeadersInit instead of Headers type.

This PR introduces a new helper that appends new headers to the existing Header collection. Should fix issues in #188 and #191.