lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.04k
stars
197
forks
source link
ProxyWithContext function doesn't work using custom domain #82
For example (base path => 'basepath', resource path => api/v1)
access via api gateway URL:
APIGatewayProxyRequest.Path => api/v1
access via custom domain:
APIGatewayProxyRequest.Path => basepath/api/v1
When custom domain access, APIGatewayProxyRequest.Path is different.
And in this case, I called ProxyWithContext function, it returned an error below. (using api gateway url (https://{restapi_id}.execute-api.{region}.amazonaws.com/{stage_name}/), it's work.)
NEXTGEN_NotFoundHttpException, No route found for \"GET /basepath/api/v1\"
I want to ask about when setting a custom domain and base path on api gateway.
I set a custom domain and base path on api gateway. (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) In this case,
events.APIGatewayProxyRequest
returns the Path including base path.For example (base path => 'basepath', resource path => api/v1)
access via api gateway URL: APIGatewayProxyRequest.Path => api/v1
access via custom domain: APIGatewayProxyRequest.Path => basepath/api/v1
When custom domain access, APIGatewayProxyRequest.Path is different. And in this case, I called
ProxyWithContext
function, it returned an error below. (using api gateway url (https://{restapi_id}.execute-api.{region}.amazonaws.com/{stage_name}/
), it's work.)NEXTGEN_NotFoundHttpException, No route found for \"GET /basepath/api/v1\"