UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

28 lines 1.3 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; export class OriginErrorPagePassThru extends 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); } } (function (OriginErrorPagePassThru) { })(OriginErrorPagePassThru || (OriginErrorPagePassThru = {})); //# sourceMappingURL=origin-error-page-pass-thru.mjs.map