UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

32 lines 1.52 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.OriginErrorPagePassThru = void 0; const resource_1 = require("cloudflare/resource"); class OriginErrorPagePassThru extends resource_1.APIResource { /** * Cloudflare will proxy customer error pages on any 502,504 errors on origin * server instead of showing a default Cloudflare error page. This does not apply * to 522 errors and is limited to Enterprise Zones. */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(`/zones/${zone_id}/settings/origin_error_page_pass_thru`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * Cloudflare will proxy customer error pages on any 502,504 errors on origin * server instead of showing a default Cloudflare error page. This does not apply * to 522 errors and is limited to Enterprise Zones. */ get(params, options) { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/settings/origin_error_page_pass_thru`, options)._thenUnwrap((obj) => obj.result); } } exports.OriginErrorPagePassThru = OriginErrorPagePassThru; (function (OriginErrorPagePassThru) { })(OriginErrorPagePassThru = exports.OriginErrorPagePassThru || (exports.OriginErrorPagePassThru = {})); //# sourceMappingURL=origin-error-page-pass-thru.js.map