The CORS middleware was incorrectly referencing `webapp-cors` for the `accessControlAllowCredentials` header, which should use `complex-cors` to match the actual middleware name. Also removed a commented-out TLS certresolver line that was no longer needed.
28 lines
1.2 KiB
YAML
28 lines
1.2 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
complex:
|
|
build: .
|
|
container_name: ComplexApi
|
|
environment:
|
|
- TZ=Asia/Tehran
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- ConnectionStrings__ComplexConnection=Server=sqlserver,1433;TrustServerCertificate=True;Database=ComplexDb;User Id=sa;Password=qwER12#$110;
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.complex.rule=Host(`complex.nabaksoft.ir`)"
|
|
- "traefik.http.services.complex.loadbalancer.server.port=80"
|
|
- "traefik.http.routers.complex.entrypoints=websecure"
|
|
- "traefik.http.routers.complex.middlewares=complex-cors@docker"
|
|
- "traefik.http.middlewares.complex-cors.headers.accessControlAllowMethods=GET,POST,PUT,DELETE,OPTIONS"
|
|
- "traefik.http.middlewares.complex-cors.headers.accessControlAllowHeaders=*"
|
|
- "traefik.http.middlewares.complex-cors.headers.accessControlAllowOriginList=https://*.nabaksoft.ir,http://192.168.8.108"
|
|
- "traefik.http.middlewares.complex-cors.headers.accessControlAllowCredentials=true"
|
|
- "traefik.http.middlewares.complex-cors.headers.addVaryHeader=true"
|
|
networks:
|
|
- services
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
services:
|
|
external: true |