hashicorp/consul-haproxy — pull request #9 by charliek (2014-09-03 19:57:25+00:00)
Title: Add CookieName value so sticky sessions can be configured

Makes the exposed data structure passed to the template richer to allow for additional options. And also adds a CookieName helper function so sticky sessions can be configured like:

```
listen auth
bind *:18084
# cookie SERVERID_AUT insert indirect nocache{{range .auth}}
{{.}} cookie {{.CookieName}} maxconn 64{{end}}
```

I am aware that sticky sessions are not the best way to write a system, but we have some legacy systems where this is unfortunately required. The exposed data structures would also allow for more flexibility in how things are templated so nginx or other proxies could potentially be implemented with no code changes.

This change should also be backwards compatible with templates already in use as well.