Loading...
Loading...
Zuplo API gateway configuration and best practices. Trigger: When configuring Zuplo API gateway.
npx skill4agent add poletron/custom-rules zuplo{
"routes": [
{
"path": "/api/users",
"methods": ["GET", "POST"],
"handler": {
"module": "$import(@zuplo/runtime)",
"export": "urlRewriteHandler",
"options": {
"rewritePattern": "https://api.example.com/users"
}
},
"policies": {
"inbound": ["rate-limit", "api-key-auth"]
}
}
]
}// ✅ ALWAYS: Use built-in API key authentication
export default {
policies: {
inbound: [
{
name: "api-key-auth",
policyType: "api-key-inbound",
handler: {
export: "ApiKeyInboundPolicy",
module: "$import(@zuplo/runtime)"
}
}
]
}
};Need auth? → Use api-key-inbound policy
Need rate limiting? → Use rate-limit policy
Need caching? → Use cache policy
Need transforms? → Use custom policy handler
Need monitoring? → Enable analytics