I've added a X-LMHD-Req-String response header for testing, and it looks like both are using the same stage when using the custom domains
$ for api in https://api.test.lmhd.me https://api.lmhd.me ; do curl -v ${api}/v1/name 2>&1 | grep x-lmhd-req-string | sed 's/< x-lmhd-req-string://' | jq .requestContext.stage; done
"dev"
"dev"
$ for api in https://28w045e9a5.execute-api.us-east-1.amazonaws.com/dev https://wda33hqws0.execute-api.us-east-1.amazonaws.com/prod ; do curl -v ${api}/v1/name 2>&1 | grep x-lmhd-req-string | sed 's/< x-lmhd-req-string://' | jq .requestContext.stage; done
"dev"
"prod"
I've added a X-LMHD-Req-String response header for testing, and it looks like both are using the same stage when using the custom domains
https://github.com/lucydavinhart/api.lmhd.me/blob/main/v1/main.go#L114-L122
https://github.com/lucydavinhart/api.lmhd.me/blob/main/v1/main.go#L75
When using the endpoints directly (in this case from https://app.circleci.com/pipelines/github/lucydavinhart/api.lmhd.me/23/workflows/2fe4aa6f-20fe-4454-b91d-03aed8387466/jobs/46), we do get the correct lambda functions: