smee-client icon indicating copy to clipboard operation
smee-client copied to clipboard

Passing all headers is causing a 403 when deploying to AWS lambda

Open gr2m opened this issue 5 years ago • 5 comments
trafficstars

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 :)

gr2m avatar Jun 24 '20 22:06 gr2m

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.

issue-label-bot[bot] avatar Jun 24 '20 22:06 issue-label-bot[bot]

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] avatar Oct 04 '20 03:10 stale[bot]

I would guess it might not like the host header, especially if going through API Gateway.

cortexcompiler avatar Nov 16 '22 19:11 cortexcompiler

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.

topikachu avatar May 07 '24 12:05 topikachu

بشكل افتراضي، 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

Emanjbr avatar Jul 08 '24 02:07 Emanjbr