Skip to content

Instantly share code, notes, and snippets.

@zs-dima
Created April 13, 2025 16:31
Show Gist options
  • Save zs-dima/5f33bbf6bbb1a2216d40206f5e655cd3 to your computer and use it in GitHub Desktop.
Save zs-dima/5f33bbf6bbb1a2216d40206f5e655cd3 to your computer and use it in GitHub Desktop.
####################################################################
- traefik.enable=true
- traefik.http.routers.auth-service.entrypoints=https
- traefik.http.routers.auth-service.rule=Host(`auth-demo-api.${DOMAIN}`)
- traefik.http.routers.auth-service.tls=true
- traefik.http.routers.auth-service.tls.certresolver=le
# Port traefik needs to route traffic to
- traefik.http.routers.auth-service.service=auth-service
- traefik.http.services.auth-service.loadbalancer.server.port=8000
- traefik.http.services.auth-service.loadbalancer.server.scheme=h2c
# Enable middleware
- traefik.http.routers.auth-service.middlewares=auth-service-grpc@swarm,auth-service-grpcweb@swarm
# Middleware gRPC Web
- traefik.http.middlewares.auth-service-grpcweb.grpcweb.allowOrigins=*
# Middleware gRPC CORS
- traefik.http.middlewares.auth-service-grpc.headers.accessControlExposeHeaders=Grpc-Status,Grpc-Message,Grpc-Encoding,Grpc-Accept-Encoding
- traefik.http.middlewares.auth-service-grpc.headers.accessControlAllowMethods=*
- traefik.http.middlewares.auth-service-grpc.headers.accessControlAllowOriginList=*
- traefik.http.middlewares.auth-service-grpc.headers.accessControlAllowHeaders=*
- traefik.http.middlewares.auth-service-grpc.headers.accessControlAllowCredentials=true
- traefik.http.middlewares.auth-service-grpc.headers.accessControlMaxAge=1000
- traefik.http.middlewares.auth-service-grpc.headers.customRequestHeaders.te=trailers
####################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment