Skip to content

Add Request Body and Header Field Masking Support for Browser SDKΒ #199

@anwarramadha

Description

@anwarramadha

The Browser SDK should support masking of sensitive data in both request bodies and headers before sending telemetry to HyperDX. This feature is important for privacy and compliance, ensuring that sensitive fields such as tokens, credentials, or personal data are not transmitted or stored.

Recommended Acceptance Criteria:

  • Allow configuration of field names (e.g., password, authorization, token) to be masked.
  • Mask matching fields in request headers.
  • Mask matching fields in request bodies (including nested objects).
  • Ensure masking happens before data leaves the client.
  • Provide default mask pattern (e.g., ***) and allow custom mask value.
  • Include documentation and usage examples in the Browser SDK README.
HyperDX.init({
  apiKey: "<API_KEY>",
  maskFields: {
    headers: ["authorization", "x-api-key"],
    body: ["password", "creditCard.number"]
  },
  maskPlaceholder: "***"
});

Goal:
Prevent sensitive or personally identifiable information from being logged or transmitted by the HyperDX Browser SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions