Mercurial > gemma
changeset 424:abe4efa339bc
Merged.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 16 Aug 2018 15:35:47 +0200 |
parents | 42e64da55095 (diff) 9869bc03155e (current diff) |
children | c49f4c1808b1 |
files | |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd/gemma/geoserver.go Thu Aug 16 15:34:08 2018 +0200 +++ b/cmd/gemma/geoserver.go Thu Aug 16 15:35:47 2018 +0200 @@ -20,14 +20,14 @@ ) const ( - startupSQL = `` // `SET SESSION AUTHORIZATION waterway_user` - closeupSQL = `` // `RESET SESSION AUTHORIZATION` + startupSQL = `SET SESSION AUTHORIZATION ${user,%s}` + closeupSQL = `RESET SESSION AUTHORIZATION` ) func basicAuth(user, password string) func(req *http.Request) { auth := "Basic " + misc.BasicAuth(user, password) return func(req *http.Request) { - req.Header.Add("authorization", auth) + req.Header.Add("Authorization", auth) } } @@ -138,7 +138,7 @@ {"user", config.SysAdmin()}, {"passwd", config.SysAdminPassword()}, {"dbtype", databaseType}, - {"Session startup SQL", startupSQL}, + {"Session startup SQL", fmt.Sprintf(startupSQL, config.SysAdmin())}, {"Session close-up SQL", closeupSQL}, }, },