Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.build.npm.esm.integrations.httpcontext.js.map Maven / Gradle / Ivy
{"version":3,"file":"httpcontext.js","sources":["../../../../src/integrations/httpcontext.ts"],"sourcesContent":["import { defineIntegration } from '@sentry/core';\nimport { WINDOW } from '../helpers';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nexport const httpContextIntegration = defineIntegration(() => {\n return {\n name: 'HttpContext',\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n },\n };\n});\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;MACa,sBAAuB,GAAE,iBAAiB,CAAC,MAAM;AAC9D,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,aAAa;AACvB,IAAI,eAAe,CAAC,KAAK,EAAE;AAC3B;AACA,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE;AACrE,QAAQ,OAAM;AACd,OAAM;AACN;AACA;AACA,MAAM,MAAM,GAAI,GAAE,CAAC,KAAK,CAAC,OAAQ,IAAG,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,MAAM,CAAC,QAAA,IAAY,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AACnG,MAAM,MAAM,EAAE,QAAA,EAAW,GAAE,MAAM,CAAC,QAAA,IAAY,EAAE,CAAA;AAChD,MAAM,MAAM,EAAE,SAAA,EAAY,GAAE,MAAM,CAAC,SAAA,IAAa,EAAE,CAAA;AAClD;AACA,MAAM,MAAM,UAAU;AACtB,QAAQ,IAAI,KAAK,CAAC,OAAA,IAAW,KAAK,CAAC,OAAO,CAAC,OAAO;AAClD,QAAQ,IAAI,QAAS,IAAG,EAAE,OAAO,EAAE,QAAS,EAAC;AAC7C,QAAQ,IAAI,SAAU,IAAG,EAAE,YAAY,EAAE,SAAU,EAAC;AACpD,OAAO,CAAA;AACP,MAAM,MAAM,OAAQ,GAAE,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,GAAA,IAAO,EAAE,GAAA,EAAK,GAAG,SAAS,CAAA;AACxE;AACA,MAAM,KAAK,CAAC,OAAQ,GAAE,OAAO,CAAA;AAC7B,KAAK;AACL,GAAG,CAAA;AACH,CAAC;;;;"}