@agentix-security/express 0.1.0 → 0.1.1
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/dist/index.cjs +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -372,6 +372,8 @@ function agentixMiddleware(sdk) {
|
|
|
372
372
|
await sdk.ensureInitialized();
|
|
373
373
|
const result = await sdk.getEngine().handle(normalize(req));
|
|
374
374
|
if (result.type === "passthrough") {
|
|
375
|
+
const baseUrl = `${req.get("x-forwarded-proto") ?? req.protocol ?? "http"}://${req.get("host") ?? req.hostname ?? "localhost"}`;
|
|
376
|
+
res.setHeader("link", `<${baseUrl}/.well-known/ai-agent.json>; rel="agent-discovery"`);
|
|
375
377
|
next();
|
|
376
378
|
return;
|
|
377
379
|
}
|
package/dist/index.js
CHANGED
|
@@ -370,6 +370,8 @@ function agentixMiddleware(sdk) {
|
|
|
370
370
|
await sdk.ensureInitialized();
|
|
371
371
|
const result = await sdk.getEngine().handle(normalize(req));
|
|
372
372
|
if (result.type === "passthrough") {
|
|
373
|
+
const baseUrl = `${req.get("x-forwarded-proto") ?? req.protocol ?? "http"}://${req.get("host") ?? req.hostname ?? "localhost"}`;
|
|
374
|
+
res.setHeader("link", `<${baseUrl}/.well-known/ai-agent.json>; rel="agent-discovery"`);
|
|
373
375
|
next();
|
|
374
376
|
return;
|
|
375
377
|
}
|