API Gateway がホスト名の先頭に「backend-cluster」プレフィックスを追加する理由を理解できません。リクエストのゲートウェイのログは次のようになります。
{
httpRequest: {
latency: "0.113s"
protocol: "HTTP/1.1"
remoteIp: "5.20.198.209"
requestMethod: "GET"
requestUrl: "https://XXX.nw.gateway.dev/organizations/XXXXXXXXX/export?period=0"
responseSize: "221"
status: 503
userAgent: "PostmanRuntime/7.28.4"
}
insertId: "5cf296ad774f8088eeb7ed100ecc4498-1@a2"
jsonPayload: {
api: "//apigateway.googleapis.com/projects/XXXXXXX/locations/global/apis/eu-dev-XXX-api"
apiConfig: "//apigateway.googleapis.com/projects/XXXXXXXX/locations/global/apis/eu-dev-XXX-api/configs/config"
apiKey: "XXXXXXXXXXXXXXXXX"
apiMethod: "1.eu_dev_XXX_api_XXXXXXXXXXX_apigateway_XXX_dev_XXXXXXX_cloud_goog.GetExport"
backendRequest: {
duration: "0ms"
hostname: "**backend-cluster-**dev.equipment.example.com:443"
path: "/api/v1/XXXXXXX/organizations/XXXXXXXXXX/export?period=0"
}
consumerNumber: "XXXXXX"
responseDetails: "upstream_reset_before_response_started{connection_failure,TLS_error:_268435581:SSL_routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED}"
}
logName: "projects/XXXXXXX/logs/apigateway.googleapis.com%2Frequests"
receiveTimestamp: "2021-10-25T08:48:03.222779242Z"
resource: {
labels: {
gateway_id: "XXXXXXXX"
location: "europe-west2"
resource_container: "projects/XXXXXX"
}
type: "apigateway.googleapis.com/Gateway"
}
timestamp: "2021-10-25T08:47:51.184895263Z"
}
ゲートウェイの構成は次のように単純です。
# openapi2-run.yaml
swagger: '2.0'
info:
title: Export API
description: This API gateway is used to access export API functionality
version: 1.0.0
schemes:
- https
produces:
- application/json
securityDefinitions:
api_key_header:
type: apiKey
name: x-api-key
in: header
paths:
/organizations/{org_id}/export:
get:
summary: Organisation export API endpoint
operationId: getExport
x-google-backend:
address: **https://dev.equipment.example.com/api/v1/XXXXXXXX**
protocol: http/1.1
path_translation: APPEND_PATH_TO_ADDRESS
parameters:
- in: "path"
name: "org_id"
description: "The organization identifier"
required: true
type: "string"
security:
- api_key_header: []
responses:
'200':
description: A successful response
schema:
type: object
アイデアにより、リダイレクトは https://dev.equipment.example.com/api/v1/XXXXXXXX/organizations/XXXXXXXXXX/export?period=0 に移動する必要がありますが、代わりにhttps://backend-cluster-dev.equipmentに移動します.example.com/api/v1/XXXXXXXX/organizations/XXXXXXXXXXX/export?period=0もちろん失敗します。
なぜそれが起こるのか、何か考えはありますか?
前もって感謝します!