Open DmitriyKabanov opened 1 year ago
Yeah, ApiGw expects Host to be Cloudfront. We would need to do mapping of original Host to something like X-Host. I would need to take a look what is recommended way of doing this in AWS.
Any ETA on this?
@DmitriyKabanov I did a research and to support this properly, we would need to create Edge Lambda that would handle renaming headers and forwarding them. It's quite unfortunate as I'm very much trying to stay away from Edge lambda due to limitations and deployment speed. I'm experimenting with keeping Edge lambdas same after first deploy.
No ETA yet, definitely bigger task than expected.
Any chance you could provide me with your usecase? Aka. what are you using Host
for? Maybe I can suggest workaround in the meantime.
The use case is to build a redirectUrl to get back to the service.
That sounds like something that can be done by many different ways. For example:
APP_URL=https://my.app.com
window
For sure, it could be done by many different ways. I'm not opposed to put a temporary workaround (as we already did). I'm curious when this enchantment would be addressed?
On the application layer we need to access the
Host
header in the request object, however it's not equal to any of alternative domain names.As of now, header behaviour is hardcoded as
CacheHeaderBehavior.allowList('accept', 'accept-language', 'content-language', 'content-type', 'user-agent', 'authorization')
.Adding
host
to this list breaks the API Gateway with 403 error, unless API Gateway is configured with custom domain names.