UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

30 lines 1.3 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.OpportunisticOnion = void 0; const resource_1 = require("cloudflare/resource"); class OpportunisticOnion extends resource_1.APIResource { /** * Add an Alt-Svc header to all legitimate requests from Tor, allowing the * connection to use our onion services instead of exit nodes. */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(`/zones/${zone_id}/settings/opportunistic_onion`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * Add an Alt-Svc header to all legitimate requests from Tor, allowing the * connection to use our onion services instead of exit nodes. */ get(params, options) { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/settings/opportunistic_onion`, options)._thenUnwrap((obj) => obj.result); } } exports.OpportunisticOnion = OpportunisticOnion; (function (OpportunisticOnion) { })(OpportunisticOnion = exports.OpportunisticOnion || (exports.OpportunisticOnion = {})); //# sourceMappingURL=opportunistic-onion.js.map