smee-client
smee-client copied to clipboard
Passing all headers is causing a 403 when deploying to AWS lambda
By default, smee-client sends all headers:
{
host: 'smee.io',
connection: 'close',
'user-agent': 'GitHub-Hookshot/ab308e1',
accept: '*/*',
'x-github-delivery': '7daaa700-b656-11ea-84ee-565013bbff02',
'x-github-event': 'installation',
'x-hub-signature': 'sha1=49d7...,
'content-type': 'application/json',
'x-request-id': '0e111...,
'x-forwarded-for': '140.82.115.152',
'x-forwarded-proto': 'https',
'x-forwarded-port': '443',
via: '1.1 vegur',
'connect-time': '5',
'x-request-start': '1593029318666',
'total-route-time': '0',
'content-length': '2937',
timestamp: 1593029318680
}
When I only pass on the headers I care about (["x-github-delivery", "x-github-event", "x-hub-signature"]), then the error goes away.
I don't have time to investigate further right now, I'm creating this as a reminder :)
Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
I would guess it might not like the host header, especially if going through API Gateway.
Is it safe to delete the host header? I meet the same issue when the target is not the same host as the proxy host.
بشكل افتراضي،
smee-clientيتم إرسال جميع الرؤوس:{ host: 'smee.io', connection: 'close', 'user-agent': 'GitHub-Hookshot/ab308e1', accept: '*/*', 'x-github-delivery': '7daaa700-b656-11ea-84ee-565013bbff02', 'x-github-event': 'installation', 'x-hub-signature': 'sha1=49d7..., 'content-type': 'application/json', 'x-request-id': '0e111..., 'x-forwarded-for': '140.82.115.152', 'x-forwarded-proto': 'https', 'x-forwarded-port': '443', via: '1.1 vegur', 'connect-time': '5', 'x-request-start': '1593029318666', 'total-route-time': '0', 'content-length': '2937', timestamp: 1593029318680 }عندما أقوم فقط بتمرير الرؤوس التي أهتم بها (
["x-github-delivery", "x-github-event", "x-hub-signature"])، فإن الخطأ يختفي.ليس لدي وقت للتحقيق أكثر الآن، أنا أقوم بإنشاء هذا كتذكير :)
https://github.com/probot/smee-client/issues/153#issuecomment-2098270961