ahoy.js
ahoy.js copied to clipboard
Add support for beforeSend callback
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.