-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cors headers #160
Comments
Hi @navinSing, this is certainly an interesting feature. As Traefik uses negroni to manage network middlewares, we could use https://github.com/rs/cors to make it work. |
Hi @emilevauge |
sorry still not sure how to do it .. like rspadd Access-Control-Allow-Origin:\ etc .. in both frontends and backends |
Hi @navinSing, as I said you can't do it right now, some dev is needed to make it work. |
any rough timelines.. |
Somewhat related, being able to modify (add/edit/remove) headers in the responses returned from backends would be nice (used for other things too). There is already a broader issue on this open: #30 Just trying to help with some issue-gardening. 🌳 🍃 🌷 |
@navinSing practically, it is up to your backend to add the CORS headers to the response and to tune the security more than to the reverse proxy. |
@navinSing There are certainly situations where CORS from the backend is impractical. We are in the process of dividing our backend from a monolith to many microservices. Together they expose one API. We do not want each of the services to decide the CORS header. We want one unified CORS header for the whole API – and that would fit nicely in our edge proxy. Edit |
We have >100 services under one API and would also prefer to manage headers on the loadbalancer itself. |
there is a lot of security related headers, not just CORS : https://blog.appcanary.com/2017/http-security-headers.html |
Any movement on this issue.? I feel allot of people use traefik as an API gateway, having forward proxy features such as CORS is such a huge win in these cases. Draining the need for each service to manage it independently. |
Closed by #1236. |
how to add cors headers similar to haproxy's rspadd .. etc
This would be much needed and common feature.
Need a quick fix to add (cors) headers to outgoing messages .. for now.
for ex: in haproxy's backend we add ,..
rspadd Access-Control-Allow-Origin:
rspadd Access-Control-Headers:\
Restrictions on frontends can be added later.
The text was updated successfully, but these errors were encountered: