docker-flow / docker-flow-proxy

Docker Flow Proxy
https://docker-flow.github.io/docker-flow-proxy/
MIT License
317 stars 189 forks source link

Support multi-line backend extras with line separator || #90

Open chrsch opened 5 years ago

chrsch commented 5 years ago

This is a first step to provide a solution for #85.

If someone could point out how to bring on the BackendExtraMultilineSeparator option I can implement this as well.

thomasjpfan commented 5 years ago

Thanks for the PR!

Editing how the template process strings, would make the code harder to follow. I would prefer BackendExtra be edited when GetServiceFromProvider here: https://github.com/docker-flow/docker-flow-proxy/blob/acff954541d834f4b2278bed7ccffe82fab51b4b/proxy/types.go#L326 In GetServiceFromProvider, the backendExtraMultilineSeparator can be queried. If it is defined and has a non-zero length, it can be used to separate BackendExtra into multiple lines.