dev-resources.site
for different kinds of informations.
Random 1: Traefik blocks CORS by Default
Published at
10/18/2023
Categories
traefik
devops
docker
random
Author
Michael Bukachi
This is the first of a new series of really short blog posts that will touch on random things. Things I discover during my day-to-day activities.
I recently discovered that traefik (v2.9
at the time of this writing), blocks CORS requests by default. This issue can quickly be resolved by adding the right labels:
- "traefik.http.middlewares.testheader.headers.accesscontrolallowmethods=*"
- "traefik.http.middlewares.testheader.headers.accesscontrolallowheaders=*"
- "traefik.http.middlewares.testheader.headers.accesscontrolalloworiginlist=*"
You can checkout more configurations options here
Featured ones: