提交代码
This commit is contained in:
29
gateway/nginx/conf.d/services/order-service.conf
Normal file
29
gateway/nginx/conf.d/services/order-service.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
# 订单服务路由
|
||||
location /api/v1/orders {
|
||||
limit_req zone=general burst=30 nodelay;
|
||||
limit_conn addr 10;
|
||||
|
||||
proxy_pass http://order_service;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Request-ID $request_id;
|
||||
}
|
||||
|
||||
# 购物车接口
|
||||
location /api/v1/cart {
|
||||
limit_req zone=general burst=20 nodelay;
|
||||
limit_conn addr 10;
|
||||
|
||||
proxy_pass http://order_service;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Request-ID $request_id;
|
||||
}
|
||||
Reference in New Issue
Block a user