mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01: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 fef7ee75e8a02dc3a6017b70dcb62dabf9183e0f 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
@ -26,6 +26,7 @@ class API {
|
||||
|
||||
return fetch(url, {
|
||||
method,
|
||||
credentials: 'same-origin',
|
||||
...options
|
||||
}).then(handleErrors);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user