Basic auth: Fixed issue when using basic auth proxy infront of Grafana, Fixes #1673

pull/1709/head
Torkel Ödegaard 11 years ago
parent cf877e6567
commit 1f330d7753
  1. 1
      CHANGELOG.md
  2. 2
      pkg/middleware/auth.go

@ -5,6 +5,7 @@
- [Issue #1681](https://github.com/grafana/grafana/issues/1681). MySQL session: fixed problem using mysql as session store
- [Issue #1671](https://github.com/grafana/grafana/issues/1671). Data sources: Fixed issue with changing default data source (should not require full page load to take effect, now fixed)
- [Issue #1685](https://github.com/grafana/grafana/issues/1685). Search: Dashboard results should be sorted alphabetically
- [Issue #1673](https://github.com/grafana/grafana/issues/1673). Basic auth: Fixed issue when using basic auth proxy infront of Grafana
# 2.0.0-Beta1 (2015-03-30)

@ -28,7 +28,7 @@ func getRequestUserId(c *Context) int64 {
func getApiKey(c *Context) string {
header := c.Req.Header.Get("Authorization")
parts := strings.SplitN(header, " ", 2)
if len(parts) == 2 || parts[0] == "Bearer" {
if len(parts) == 2 && parts[0] == "Bearer" {
key := parts[1]
return key
}

Loading…
Cancel
Save