I'm using Traefik on my Ubuntu server. Cors works fine for one website but when I try to use it for two they seem to conflict. What is the correct syntax?
This is what I have in my docker-compose file:
Service 1:
- "traefik.http.routers.service-one.middlewares=cors"
- "traefik.http.middlewares.cors.headers.accesscontrolallowmethods=GET,OPTIONS,PUT"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=https://site1.com,https://site2.com,https://site2.com"
- "traefik.http.middlewares.cors.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
Service 2:
- "traefik.http.routers.service-two.middlewares=cors"
- "traefik.http.middlewares.cors.headers.accesscontrolallowmethods=GET,OPTIONS,PUT"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=https://site1.com,https://site2.com,https://site2.com"
- "traefik.http.middlewares.cors.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"