Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const core = require('@sentry/core'); const INTEGRATION_NAME = "HttpServer"; const _httpServerIntegration = ((options = {}) => { return { name: INTEGRATION_NAME, maxRequestBodySize: options.maxRequestBodySize ?? "medium", ignoreRequestBody: options.ignoreRequestBody }; }); const httpServerIntegration = core.defineIntegration(_httpServerIntegration); async function captureIncomingRequestBody(client, request) { const integration = client.getIntegrationByName(INTEGRATION_NAME); if (!integration) { return; } const maxRequestBodySize = integration.maxRequestBodySize; if (maxRequestBodySize === "none") { return; } if (request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") { return; } if (integration.ignoreRequestBody?.(request.url, request)) { return; } const isolationScope = core.getIsolationScope(); await core.captureBodyFromWinterCGRequest(request, isolationScope, maxRequestBodySize); } exports.captureIncomingRequestBody = captureIncomingRequestBody; exports.httpServerIntegration = httpServerIntegration; //# sourceMappingURL=httpServer.js.map