mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 14:18:03 +00:00
fix: proxy issue
This commit is contained in:
parent
cc6b364b87
commit
5b6619d1de
4 changed files with 17 additions and 2 deletions
|
|
@ -24,6 +24,12 @@ service.interceptors.request.use(function (config) {
|
|||
if (baseURL[0] !== '/' && !process.env.IS_ELECTRON) {
|
||||
config.params.cookie = `MUSIC_U=${Cookies.get('MUSIC_U')};`;
|
||||
}
|
||||
|
||||
const proxy = JSON.parse(localStorage.getItem('settings')).proxyConfig;
|
||||
if (['HTTP', 'HTTPS'].includes(proxy.protocol)) {
|
||||
config.params.proxy = `${proxy.protocol}://${proxy.server}:${proxy.port}`;
|
||||
}
|
||||
|
||||
return config;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue