Add MCP proxy address config support, better error messages
This commit is contained in:
@@ -38,7 +38,7 @@ app.use(cors());
|
||||
|
||||
let webAppTransports: SSEServerTransport[] = [];
|
||||
|
||||
const createTransport = async (req: express.Request) => {
|
||||
const createTransport = async (req: express.Request): Promise<Transport> => {
|
||||
const query = req.query;
|
||||
console.log("Query parameters:", query);
|
||||
|
||||
@@ -70,6 +70,7 @@ const createTransport = async (req: express.Request) => {
|
||||
const headers: HeadersInit = {
|
||||
Accept: "text/event-stream",
|
||||
};
|
||||
|
||||
for (const key of SSE_HEADERS_PASSTHROUGH) {
|
||||
if (req.headers[key] === undefined) {
|
||||
continue;
|
||||
@@ -172,6 +173,12 @@ app.post("/message", async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/health", (req, res) => {
|
||||
res.json({
|
||||
status: "ok",
|
||||
});
|
||||
});
|
||||
|
||||
app.get("/config", (req, res) => {
|
||||
try {
|
||||
res.json({
|
||||
|
||||
Reference in New Issue
Block a user