mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
fix: configure fetch to send cookies
Previously, when XMLHttpRequest was used, cookies ware sent
when getting /-/verdaccio/logo & /-/verdaccio/packages
After switching to fetch in sha fef7ee75e8
cookies are no longer sent.
This commit configures fetch in the webui to send cookies to the same
domain.
> The "same-origin" value makes fetch behave similarly to
> XMLHttpRequest with regards to cookies.
> https://github.com/github/fetch#sending-cookies
This commit is contained in:
parent
b13eeab4dd
commit
98ac855e0f
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ class API {
|
|||
|
||||
return fetch(url, {
|
||||
method,
|
||||
credentials: 'same-origin',
|
||||
...options
|
||||
}).then(handleErrors);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue