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

"Accept" Header Not Working #183

Closed
dgmartin opened this issue Feb 17, 2022 · 1 comment
Closed

"Accept" Header Not Working #183

dgmartin opened this issue Feb 17, 2022 · 1 comment

Comments

@dgmartin
Copy link
Contributor

After trying to trigger a Gitlab webhook and failing I started playing around with the different settings. One change I tried making was updating the value for the "Accept" header. I ended up using Burp Suite to intercept the request and found that the header was not actually getting updated. Based on what I could tell (Sorry, I'm an Android dev not web) it seems this is the problem code is at line 41 of the urlExport.ts file:

  if (exportSettings.acceptHeader !== '') {
    request.setRequestHeader('Accept', 'application/vnd.github.everest-preview+json')
  }

It seems it's changing the value when it is NOT empty when really it should change it when it IS empty. The code should probably look like this:

const acceptHeader = exportSettings.acceptHeader || 'application/vnd.github.everest-preview+json'
request.setRequestHeader('Accept', acceptHeader)

Note: For anyone reading this looking for updates on the Gitlab flow see the following tickets:
#181
#182

@lukasoppermann
Copy link
Owner

This is fixed in #184 thank you.

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

No branches or pull requests

2 participants