mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 21:32:22 +08:00
Basic auth: Fixed issue when using basic auth proxy infront of Grafana, Fixes #1673
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user