Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which event should I subscribe to control header value? #328

Closed
iwindfree opened this issue Sep 28, 2021 · 1 comment
Closed

Which event should I subscribe to control header value? #328

iwindfree opened this issue Sep 28, 2021 · 1 comment

Comments

@iwindfree
Copy link

I am developing boomerang plugin.
I want to add custom value to request header or read specific header value from response header (simple page and xhr ). Which event should I subscribe (ex: xhr_load, xhr_send etc)
I've looked in the development document for boomerang, but I can't find it exactly.

@andreas-marschke
Copy link

If you look at the code here: https://github.com/akamai/boomerang/blob/master/plugins/auto-xhr.js#L2232
You can find the xhr_init function that's called when an XHR is being initialized(open(ed)).

Unfortunately, as you can see when you scroll down to around here: https://github.com/akamai/boomerang/blob/master/plugins/auto-xhr.js#L2365
You'll see there's no chance for you to modify any and all network requests made on the page to include a header value.

However, if you intend to add that feature, feel free to contribute it to the team :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants