Anyone here have issues with API Gateway consuming...
# help
a
Anyone here have issues with API Gateway consuming the authorization header when using a proxy to send the request?
f
Hey @Aman Saran by
proxy
do u mean an HTTP proxy like this?
Copy code
routes: {
    "GET /": {
      url: "<http://domain.com>",
    },
  },
j
My colleague was dealing with this recently. The authorization header seems to be stripped by API gateway. However it's preserved if you use own authorizer. So you can use noop authorizer as a workaround.
Maybe you could also move the header with parameter mapping, dunno.
One could think that maybe the custom authorizer is supposed to remove the header itself to match the behavior without authorizer, but authorizer can't do that - it can only modify context. It's weird.
f
@Jan Plaček thanks for sharing!
a
@Frank Sorry, I should have been more clear. By proxy, I mean I have a proxy set up in a NextJS app that makes requests to API Gateway. This is done so that I can use HTTP only cookies and attach them as headers server side on the NextJS app. @Jan Plaček Are there any examples of doing the mapping in SST?
j
Unfortunately SST doesn't support mapping atm. At least not in a convenient way... it's probably doable with "low level" CDK constructs.
But firstly I would try setting it up manually in AWS console.
When you pick a route, there is "integration" panel on the right and on the bottom is Add parameter or something like that