ahoy.js icon indicating copy to clipboard operation
ahoy.js copied to clipboard

Add support for beforeSend callback

Open zokioki opened this issue 3 years ago • 0 comments

This allows ahoy to be configured with an optional beforeSend callback, allowing the user to modify a request before sending if needed. For example:

ahoy.configure({
  beforeSend: (xhr, settings) => {
    // do something with request ...
  }
});

One use case for this is to allow for the setting of custom headers on a per-request basis.

zokioki avatar Dec 25 '21 08:12 zokioki