When performing an OPTIONS request on the URL (tried using curl), traefik does not handle the response, and instead passes it through to the service, which does not handle OPTIONS requests. This breaks CORS preflight requests.
What am I doing wrong? How can I troubleshoot this?
Ok, I've found the issue seems to be sporadic. I'm seeing this message in the logs:
middleware \"cors-allow@file\" does not exist
Which is odd, b/c the middleware is definitely there in the base config.I'm not changing or updating the base config at any time. But sometimes when I touch-update the individual deployment config, the middleware loads successfully.
Is there some race condition that can occur when updating configs that causes the middleware to not be found?
Should I instead be defining middleware with each individual deployment config and not the base config?
Check the log at startup. Maybe with --loglevel=DEBUG. I'm guessing an error on loading that middleware.
As per Cors Headers
This is the way I do it, lists of methods and origins, but using docker labels.
I'm not too savvy with the TOML I use yaml when I have to do a file provider/config, so I cannot parse a
Yeah, that config worked correctly because of the ports and the providers.docker=true. Initially, I overlooked the necessity of defining the HTTPS listening port.
I appreciate you sharing your repo to the Traefik example. It was immensely helpful in addressing several questions I had.
Ultimately, I discovered the root cause of my configuration issue. It stemmed from modifications I had previously made to the host file, which resulted in the localhost:8080 address no longer being reachable.
Again, thanks so much friend, you are a good friend!