cloudflare
Version:
The official TypeScript library for the Cloudflare API
26 lines • 1.2 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { path } from "../../../internal/utils/path.mjs";
export var BaseFallthrough = /* @__PURE__ */ (() => {
class BaseFallthrough extends APIResource {
/**
* Generates a WAF expression template that matches fallthrough traffic for the
* supplied API hosts. This operation is deprecated and should not be used for new
* integrations.
*
* @deprecated Use the cf.api_gateway.fallthrough_detected field in custom rule for a more customized logic check.
*/
create(params, options) {
const { zone_id, ...body } = params;
return this._client.post(path `/zones/${zone_id}/api_gateway/expression-template/fallthrough`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseFallthrough._key = Object.freeze(['apiGateway', 'expressionTemplate', 'fallthrough']);
return BaseFallthrough;
})();
export class Fallthrough extends BaseFallthrough {
}
//# sourceMappingURL=fallthrough.mjs.map