Skip to content

Provide a way to set custom headers in report function #168

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

Closed
atxulo opened this issue Jul 5, 2016 · 1 comment
Closed

Provide a way to set custom headers in report function #168

atxulo opened this issue Jul 5, 2016 · 1 comment
Milestone

Comments

@atxulo
Copy link

atxulo commented Jul 5, 2016

I'm using StackTrace.report to send errors to my server and i need a way to send more headers than the ones provided by StackTrace (i use Spring to protect a REST API against CSRF and i need to send a header called "X-CSRF-TOKEN").

Maybe StackTrace.report should have an "options" parameter where i could add my custom header:

var options = { headers: { X-CSRF-TOKEN: 'xxxxxxxxxxxxxxxxxxx'}}; StackTrace.report(stackframes, url, message, options)

This new parameter could be used to add more options later.

eriwen added a commit that referenced this issue Dec 18, 2016
This adds a 4th Object parameter for request options to
StackTrace.report(). Specifying headers: {} allows one to
customize request headers.

Issue: #168
@eriwen
Copy link
Member

eriwen commented Dec 18, 2016

This is handled by 2e8dbc2 and will be released in v2.0.0 soon.

@eriwen eriwen closed this as completed Dec 18, 2016
@eriwen eriwen added this to the 2.0 milestone Dec 18, 2016
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

2 participants