Commit 83ebaea 1 parent b5054fe commit 83ebaea Copy full SHA for 83ebaea
File tree 2 files changed +11
-20
lines changed
2 files changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ services:
5
5
image : nginx
6
6
container_name : nginx
7
7
ports :
8
- - 8080:8080
8
+ - 8080:80
9
9
volumes :
10
10
- ./nginx/conf.d:/etc/nginx/conf.d
11
11
Original file line number Diff line number Diff line change 1
1
map $request_body $matching {
2
- include /etc/nginx/conf.d/matching;
3
2
default 'not_matching';
3
+ include /etc/nginx/conf.d/matching;
4
4
}
5
5
6
6
server {
7
- listen 8080;
8
7
default_type text/plain;
9
8
10
9
location / {
11
10
proxy_set_header 'X-Matching' $matching;
12
- proxy_pass http://fork;
11
+ proxy_pass http://localhost/ fork;
13
12
}
14
13
15
- location /ping {
16
- return 200 'pong';
17
- add_header Content-Type text/plain;
18
- }
19
-
20
- }
21
-
22
- upstream fork {
23
- server 127.0.0.1:3675;
24
- }
25
- server {
26
- default_type text/plain;
27
- listen 3675;
28
-
29
- location / {
14
+ location /fork {
30
15
try_files /unknown-file-to-trigger-redirect /$http_x_matching;
31
16
}
32
17
location /matching {
33
18
proxy_pass http://host.docker.internal:5015;
34
19
}
35
20
location /not_matching {
36
21
proxy_pass http://host.docker.internal:5066;
37
- }
22
+ }
23
+
24
+ location /ping {
25
+ return 200 'pong';
26
+ add_header Content-Type text/plain;
27
+ }
28
+
38
29
}
You can’t perform that action at this time.
0 commit comments