refactor: deduplicate URL generation and standardize on localhost
- Extract duplicated URL generation code into getClientUrl() helper function in start.js - Replace all 127.0.0.1 references with localhost for consistency across codebase - Update server to respect HOST environment variable for URL generation - Remove 127.0.0.1 from default allowed origins in CORS configuration - Update documentation to use localhost instead of 127.0.0.1 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9c5c7575c0
commit
fe2c5c767d
1 changed files with 21 additions and 20 deletions
|
|
@ -40,7 +40,7 @@ const server = http.createServer((request, response) => {
|
|||
});
|
||||
|
||||
const port = process.env.PORT || 6274;
|
||||
const host = process.env.HOST || "127.0.0.1";
|
||||
const host = process.env.HOST || "localhost";
|
||||
server.on("listening", () => {
|
||||
console.log(
|
||||
`🔍 MCP Inspector is up and running at http://${host}:${port} 🚀`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue