Custom HTTP Headers in Matomo Tracking Requests

Custom HTTP Headers in Matomo Tracking Requests:
We use a server-side tracking proxy that forwards Matomo tracking requests with server-side authentication. We need to include custom HTTP headers in tracking requests.

Question: Does Matomo JavaScript tracking support adding custom HTTP headers to tracking requests when using:

  1. setTrackerUrl() with a custom endpoint?
  2. Matomo Tag Manager?
  3. Any other Matomo API methods?

Context: We route tracking through /api/MatomoTrackingProxy/Track and need to validate requests server-side using custom headers.
Is there a native way to add custom headers?