mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-03 02:59: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
d64ae18bfc
commit
db7a7e2c2b
@ -21,7 +21,7 @@ export class CallBackServer {
|
|||||||
if (req.url?.startsWith(path)) {
|
if (req.url?.startsWith(path)) {
|
||||||
try {
|
try {
|
||||||
// Parse the URL to extract the authorization code
|
// 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')
|
const code = url.searchParams.get('code')
|
||||||
if (code) {
|
if (code) {
|
||||||
// Emit the code event
|
// Emit the code event
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export class McpOAuthClientProvider implements OAuthClientProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get redirectUrl(): string {
|
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() {
|
get clientMetadata() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user