UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

30 lines 1.39 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.TrueClientIPHeaderResource = void 0; const resource_1 = require("cloudflare/resource"); class TrueClientIPHeaderResource extends resource_1.APIResource { /** * Allows customer to continue to use True Client IP (Akamai feature) in the * headers we send to the origin. This is limited to Enterprise Zones. */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(`/zones/${zone_id}/settings/true_client_ip_header`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * Allows customer to continue to use True Client IP (Akamai feature) in the * headers we send to the origin. This is limited to Enterprise Zones. */ get(params, options) { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/settings/true_client_ip_header`, options)._thenUnwrap((obj) => obj.result); } } exports.TrueClientIPHeaderResource = TrueClientIPHeaderResource; (function (TrueClientIPHeaderResource) { })(TrueClientIPHeaderResource = exports.TrueClientIPHeaderResource || (exports.TrueClientIPHeaderResource = {})); //# sourceMappingURL=true-client-ip-header.js.map