poe-code 3.0.436 → 3.0.437
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -242,7 +242,9 @@ export function createHttpServer(options) {
|
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
244
|
httpServer.handleRequest = async (req, res) => {
|
|
245
|
-
|
|
245
|
+
const { baseUrl } = req;
|
|
246
|
+
const protectedResourcePath = typeof baseUrl === "string" && baseUrl.length > 0 ? baseUrl : "/mcp";
|
|
247
|
+
if (!(await authorizeHttpRequest(req, res, protectedResourcePath))) {
|
|
246
248
|
return;
|
|
247
249
|
}
|
|
248
250
|
await transport.handleRequest(req, res);
|