UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

30 lines 1.36 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.OpportunisticOnionResource = void 0; const resource_1 = require("cloudflare/resource"); class OpportunisticOnionResource 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.OpportunisticOnionResource = OpportunisticOnionResource; (function (OpportunisticOnionResource) { })(OpportunisticOnionResource = exports.OpportunisticOnionResource || (exports.OpportunisticOnionResource = {})); //# sourceMappingURL=opportunistic-onion.js.map