mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
fix(McpOAuthClientProvider): update redirect URL (#5449)
fix(McpOAuthClientProvider): update redirect URL to use 127.0.0.1 instead of localhost
This commit is contained in:
parent
66534c60f0
commit
4c8685d427
@ -21,7 +21,7 @@ export class CallBackServer {
|
||||
if (req.url?.startsWith(path)) {
|
||||
try {
|
||||
// Parse the URL to extract the authorization code
|
||||
const url = new URL(req.url, `http://localhost:${port}`)
|
||||
const url = new URL(req.url, `http://127.0.0.1:${port}`)
|
||||
const code = url.searchParams.get('code')
|
||||
if (code) {
|
||||
// Emit the code event
|
||||
|
||||
@ -27,7 +27,7 @@ export class McpOAuthClientProvider implements OAuthClientProvider {
|
||||
}
|
||||
|
||||
get redirectUrl(): string {
|
||||
return `http://localhost:${this.config.callbackPort}${this.config.callbackPath}`
|
||||
return `http://127.0.0.1:${this.config.callbackPort}${this.config.callbackPath}`
|
||||
}
|
||||
|
||||
get clientMetadata() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user