# HG changeset patch # User Sascha L. Teichmann # Date 1534426547 -7200 # Node ID abe4efa339bc2430f5709ee59a8aa2cdb957ce6e # Parent 42e64da55095b8bf6bed1d69ea630eebe31aa279# Parent 9869bc03155e1d574c08cdaa62ff495537085b00 Merged. diff -r 9869bc03155e -r abe4efa339bc cmd/gemma/geoserver.go --- 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}, }, },