MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //home/cafsindia/snap.cafsinfotech.in/node_modules/@sentry/browser/esm/integrations/httpcontext.js
import { WINDOW } from '../helpers.js';

/** HttpContext integration collects information about HTTP request headers */
class HttpContext  {
  /**
   * @inheritDoc
   */
   static __initStatic() {this.id = 'HttpContext';}

  /**
   * @inheritDoc
   */

   constructor() {
    this.name = HttpContext.id;
  }

  /**
   * @inheritDoc
   */
   setupOnce() {
    // noop
  }

  /** @inheritDoc */
   preprocessEvent(event) {
    // if none of the information we want exists, don't bother
    if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {
      return;
    }

    // grab as much info as exists and add it to the event
    const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);
    const { referrer } = WINDOW.document || {};
    const { userAgent } = WINDOW.navigator || {};

    const headers = {
      ...(event.request && event.request.headers),
      ...(referrer && { Referer: referrer }),
      ...(userAgent && { 'User-Agent': userAgent }),
    };
    const request = { ...event.request, ...(url && { url }), headers };

    event.request = request;
  }
} HttpContext.__initStatic();

export { HttpContext };
//# sourceMappingURL=httpcontext.js.map