@@ -20,22 +20,82 @@ server {
2020 return 200 '{"status":"ok","version":"${APP_VERSION}"}' ;
2121 }
2222
23- # Proxy API requests to the appropriate services
23+ #error_page 404 /404.html;
24+
25+ # redirect server error pages to the static page /50x.html
26+ #
27+ error_page 500 502 503 504 /50x .html;
28+ location = /50x .html {
29+ root /usr/share/nginx/html;
30+ }
31+
32+ location ~ ^/api/makeline/order/( ?<id>\w+) {
33+ proxy_pass http ://makeline-service:3001 /order/$id ;
34+ proxy_http_version 1.1;
35+ }
36+
37+ location /api/makeline/order {
38+ proxy_pass http ://makeline-service:3001 /order;
39+ proxy_http_version 1.1;
40+ }
41+
42+ location /api/makeline/order/fetch {
43+ proxy_pass http ://makeline-service:3001 /order/fetch;
44+ proxy_http_version 1.1;
45+ }
46+
47+ location /api/order {
48+ proxy_pass http ://order-service:3000 /;
49+ proxy_http_version 1.1;
50+ }
51+
52+ location /api/products/ {
53+ proxy_pass http ://product-service:3002 /;
54+ proxy_http_version 1.1;
55+ }
56+
2457 location /api/products {
25- proxy_pass ${ PRODUCT_SERVICE_URL} ;
26- proxy_set_header Host $host ;
27- proxy_set_header X-Real-IP $remote_addr ;
28- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
29- proxy_set_header X-Forwarded-Proto $scheme ;
58+ proxy_pass http ://product-service:3002 /;
59+ proxy_http_version 1.1;
60+ }
61+
62+ # location ~* ^/api/products {
63+ # proxy_pass http://product-service:3002/;
64+ # proxy_http_version 1.1;
65+ # }
66+
67+ location ~ ^/api/product/( ?<id>\w+) {
68+ proxy_pass http ://product-service:3002 /$id ;
69+ proxy_http_version 1.1;
70+ }
71+
72+ # location ~* ^/api/product {
73+ # proxy_pass http://product-service:3002/;
74+ # proxy_http_version 1.1;
75+ # }
76+
77+ location /api/product {
78+ proxy_pass http ://product-service:3002 /;
79+ proxy_http_version 1.1;
80+ }
81+
82+ location /api/product/ {
83+ proxy_pass http ://product-service:3002 /;
84+ proxy_http_version 1.1;
3085 }
3186
32- location /api/makeline {
33- proxy_pass ${ MAKELINE_SERVICE_URL} ;
34- proxy_set_header Host $host ;
35- proxy_set_header X-Real-IP $remote_addr ;
36- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
37- proxy_set_header X-Forwarded-Proto $scheme ;
87+ location /api/ai/health {
88+ proxy_pass http ://product-service:3002 /ai/health;
89+ proxy_http_version 1.1;
3890 }
3991
40- error_page 404 /index .html;
92+ location /api/ai/generate/description {
93+ proxy_pass http ://product-service:3002 /ai/generate/description;
94+ proxy_http_version 1.1;
95+ }
96+
97+ location /api/ai/generate/image {
98+ proxy_pass http ://product-service:3002 /ai/generate/image;
99+ proxy_http_version 1.1;
100+ }
41101}
0 commit comments