Hi we have been trying to handle an inbound request from HAProxy and use API Gateway to handle the request.
The flow is domain1.com is the end point at HAProxy.
HAProxy should then forward to request to a API Gatway on amazon which is using a custom domain domain2.com
When we try this we receive an error from cloudfront. I believe this is due to the SNI requirement for API Gatway to know where to route the request to. For that reason we implemented the following
backend api_gateway
http-request set-header host domain2.com
server api domain2.com:443 check ssl sni str(domain2.com) verify none
This doesn't work we receive a 403 error. Interestingly if we use the non custom domain and point it to the Amazon provided stage URL it works! Well kind of works we can't use it because the stage URL requires the stage in the path i.e /prod which we can not fix.
Does anyone know how we can fix this such that the custom URL works when being passed to from HAProxy?
Thanks,
Tom