0
Fork 0
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:
Håkan Canberger 2018-06-11 12:50:53 +02:00
parent b13eeab4dd
commit 98ac855e0f

View file

@ -26,6 +26,7 @@ class API {
return fetch(url, {
method,
credentials: 'same-origin',
...options
}).then(handleErrors);
}