Merge pull request #9 from geelen/prelaunch-vibes
Decent refactoring, now the popup actually works
This commit is contained in:
commit
939348aa11
3 changed files with 761 additions and 378 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcp-remote",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.10",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"mcp-remote": "dist/cli/proxy.js"
|
||||
|
|
|
@ -44,7 +44,7 @@ export class NodeOAuthClientProvider implements OAuthClientProvider {
|
|||
}
|
||||
|
||||
get redirectUrl(): string {
|
||||
return `http://localhost:${this.options.callbackPort}${this.callbackPath}`
|
||||
return `http://127.0.0.1:${this.options.callbackPort}${this.callbackPath}`
|
||||
}
|
||||
|
||||
get clientMetadata() {
|
||||
|
@ -229,7 +229,7 @@ export function setupOAuthCallbackServer(options: OAuthCallbackServerOptions) {
|
|||
})
|
||||
|
||||
const server = app.listen(options.port, () => {
|
||||
console.error(`OAuth callback server running at http://localhost:${options.port}`)
|
||||
console.error(`OAuth callback server running at http://127.0.0.1:${options.port}`)
|
||||
})
|
||||
|
||||
/**
|
||||
|
@ -299,7 +299,7 @@ export async function parseCommandLineArgs(args: string[], defaultPort: number,
|
|||
}
|
||||
|
||||
const url = new URL(serverUrl)
|
||||
const isLocalhost = url.hostname === 'localhost' && url.protocol === 'http:'
|
||||
const isLocalhost = (url.hostname === 'localhost' || url.hostname === '127.0.0.1') && url.protocol === 'http:'
|
||||
|
||||
if (!(url.protocol == 'https:' || isLocalhost)) {
|
||||
console.error(usage)
|
||||
|
|
1131
src/react/index.ts
1131
src/react/index.ts
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue