Skip to content

Commit afbc043

Browse files
committed
Add NGINX API gateway
1 parent cdb7119 commit afbc043

19 files changed

+137
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
location /admin/matching-service/ {
2+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
location /admin/question-service/ {
2+
location /admin/question-service/questions {
3+
proxy_pass http://question-service/questions;
4+
}
5+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
upstream user-service {
2+
server user-service:$USER_SVC_PORT;
3+
}
4+
5+
upstream question-service {
6+
server question-service:$QUESTION_SVC_PORT;
7+
}
8+
9+
upstream matching-service {
10+
server matching-service:$MATCHING_SVC_PORT;
11+
}
12+
13+
upstream frontend {
14+
server frontend:$FRONTEND_PORT;
15+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
location /verify-token {
2+
internal;
3+
4+
proxy_pass_request_body off;
5+
proxy_set_header Content-Length "";
6+
proxy_pass http://user-service/auth/verify-token;
7+
}
8+
9+
location /verify-owner {
10+
internal;
11+
12+
proxy_pass_request_body off;
13+
proxy_set_header Content-Length "";
14+
proxy_pass http://user-service/auth/verify-owner;
15+
}
16+
17+
location /verify-admin {
18+
internal;
19+
20+
proxy_pass_request_body off;
21+
proxy_set_header Content-Length "";
22+
proxy_pass http://user-service/auth/verify-admin;
23+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
location / {
2+
proxy_pass http://frontend;
3+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
location /owner/matching-service/ {
2+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
location /owner/question-service/ {
2+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
location /private/matching-service/ {
2+
location /private/matching-service/match {
3+
proxy_pass http://matching-service/match;
4+
}
5+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
location /private/question-service/ {
2+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
location /private/user-service/ {
2+
}

0 commit comments

Comments
 (0)