From abcb86cfdb4b9160a6a7e75bc92b3fc2a330892a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chu=20V=C4=83n=20H=E1=BA=A3i?= Date: Tue, 7 Jul 2026 20:51:54 +0700 Subject: [PATCH] up --- apisix-stack/README.MD | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/apisix-stack/README.MD b/apisix-stack/README.MD index 5d036cd..fba4cf7 100644 --- a/apisix-stack/README.MD +++ b/apisix-stack/README.MD @@ -214,6 +214,52 @@ curl -i http://localhost:9180/apisix/admin/routes/ssm-vn-dev-route \ }' ``` +```bash +curl -i http://localhost:9180/apisix/admin/routes/app-service-route \ + -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \ + -H 'Content-Type: application/json' \ + -X PUT \ + -d '{ + "uri": "/app-service/*", + "name": "app-service-route", + "plugins": { + "key-auth": {}, + "real-ip": { + "source": "client_real_ip", + "trusted_addresses": [ + "127.0.0.1", + "10.0.0.0/8", + "172.16.0.0/12", + "192.168.0.0/16" + ], + "recursive": true + }, + "proxy-rewrite": { + "regex_uri": [ + "^/app-service(/.*)$", + "$1" + ], + "headers": { + "X-API-Key": "yREuD0YYtD9M6699" + } + }, + "limit-count": { + "count": 100, + "time_window": 60, + "rejected_code": 429 + } + }, + "upstream": { + "type": "roundrobin", + "nodes": { + "service.tntechglobal.io.vn:443": 1 + }, + "pass_host": "node", + "scheme": "https" + } + }' +``` + > [!IMPORTANT] > **Giải thích tham số cấu hình Upstream:** > * `pass_host: "node"`: Bắt buộc cấu hình trường này để APISIX ghi đè giá trị header `Host` gửi tới Dynamics 365 trùng khớp với node URL (`.crm.dynamics.com`). Nếu thiếu, Dynamics 365 sẽ từ chối xử lý request vì host header không khớp.