Skip to content

Commit 2bdb59e

Browse files
committed
traefik works woo
1 parent 3141f07 commit 2bdb59e

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

docker-compose.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
version: "3.3"
22

3-
networks:
4-
proxy:
5-
external: { }
6-
73
services:
84
grpc-proxy:
95
image: "traefik:v3.1"
106
container_name: "traefik"
11-
12-
# - "traefik.http.middlewares.testheader.headers.accesscontrolallowmethods=POST,GET,OPTIONS,PUT"
13-
# - "traefik.http.middlewares.testheader.headers.accesscontrolalloworigin=*"
14-
# - "traefik.http.middlewares.testheader.headers.accesscontrolmaxage=100"
15-
# - "traefik.http.middlewares.testheader.headers.addvaryheader=true"
16-
177
ports:
18-
- "1234:1234"
8+
- "1234:80"
9+
- "8080:8080"
1910
volumes:
2011
- "/var/run/docker.sock:/var/run/docker.sock:ro"
2112
- "./dynamic.yml:/etc/traefik/dynamic.yml:ro"
2213
- "./traefik.yml:/etc/traefik/traefik.yml:ro"
23-
networks:
24-
- proxy

dynamic.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ http:
22
routers:
33
routerTest:
44
service: srv-grpc
5-
rule: Host(`*`)
5+
rule: Host(`localhost`)
6+
middlewares:
7+
- "test-grpc-web"
8+
- "test-headers"
69
entryPoints:
710
- web
811

@@ -11,6 +14,7 @@ http:
1114
grpcWeb:
1215
allowOrigins:
1316
- "*"
17+
test-headers:
1418
headers:
1519
accessControlAllowMethods:
1620
- "POST"
@@ -21,9 +25,12 @@ http:
2125
accessControlAllowOriginList: "*"
2226
addVaryHeader: true
2327
accessControlMaxAge: 100
28+
customRequestHeaders:
29+
- te: trailers
2430

2531
services:
2632
srv-grpc:
2733
loadBalancer:
2834
servers:
29-
- url: https://zec.rocks:443
35+
- url: https://testnet.zec.rocks:443
36+
passHostHeader: true

traefik.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ api:
66
insecure: true
77

88
log:
9-
level: DEBUG
9+
level: INFO
1010
format: common
1111

1212
entryPoints:
1313
web:
14-
address: :1234
14+
address: :80
1515

1616
providers:
1717
file:

0 commit comments

Comments
 (0)