Is it possible to support allowed methods per URL?
currently its only possible to manage global allowed methods.
const env = new Bash({
network: {
allowedUrlPrefixes: ["https://api.example.com"],
allowedMethods: ["GET", "HEAD", "POST"], // Default: ["GET", "HEAD"]
},
});
but having the option to restrict the method per url would be more granular.
const env = new Bash({
network: {
allowedMethods: ["GET", "HEAD"],
allowedUrlPrefixes: [
"https://public-api.com", // plain string — no transforms
{
url: "https://ai-gateway.vercel.sh",
methods: ["POST"], // <-- support this :)
transform: [{ headers: { Authorization: "Bearer secret" } }],
},
],
},
});
Use case is if only certain endpoints should allow POST, not all.
Small change but general bigger security impact.
Is it possible to support allowed methods per URL?
currently its only possible to manage global allowed methods.
but having the option to restrict the method per url would be more granular.
Use case is if only certain endpoints should allow POST, not all.
Small change but general bigger security impact.