Skip to content

Commit

Permalink
feat(app): enable endpoint by default
Browse files Browse the repository at this point in the history
It's almost required by all clients now.
Pass `--endpoint -` to disable it if necessary.

Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Jun 10, 2023
1 parent 69e00fc commit a6a62cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ if (config.proxyUrl && !/http(s?):\/\/.+:\d+/.test(config.proxyUrl)) {
console.log('Please check the proxy url.');
process.exit(1);
}
if (config.endpoint && !/http(s?):\/\/.+/.test(config.endpoint)) {
if (!config.endpoint) config.endpoint = 'https://music.163.com';
else if (config.endpoint === '-') config.endpoint = '';
else if (!/http(s?):\/\/.+/.test(config.endpoint)) {
console.log('Please check the endpoint host.');
process.exit(1);
}
Expand Down

0 comments on commit a6a62cf

Please sign in to comment.