Skip to content

Commit

Permalink
fix: missing github x-forwarded-for headers (#27)
Browse files Browse the repository at this point in the history
Apparently this headers can be missing in some case.
Probably linked to organisation or not using secret auth system
  • Loading branch information
Hector6704 committed May 4, 2020
1 parent ad3e451 commit 58f3264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ function constructHeaders(reqHeaders) {
headers['content-length'] = reqHeaders['content-length'];
headers['content-type'] = reqHeaders['content-type'];
headers['user-agent'] = reqHeaders['user-agent'];
headers['x-forwarded-for'] = reqHeaders['x-forwarded-for'];
if (reqHeaders['x-forwarded-for'] ) {
headers['x-forwarded-for'] = reqHeaders['x-forwarded-for'];
}
headers['x-github-delivery'] = reqHeaders['x-github-delivery'];
headers['x-github-event'] = reqHeaders['x-github-event'];

Expand Down

0 comments on commit 58f3264

Please sign in to comment.