According to the stackoverflow answer below, it is recommended to not include a trailing / in cookies' path. By removing the trailing / for our cookies path value, people's browsers visiting grafana will pass the cookie not only to /grafana/ sub paths but also to /grafana sub paths. This commit avoids the situation where a user would visit http://localhost/grafana, get redirected to http://localhost/grafana/login, and following login get redirected back to http://localhost/grafana, but since the grafana_session cookie isn't passed along get redirected back once more to http://localhost/grafana/login. ref: https://stackoverflow.com/questions/36131023/setting-a-slash-on-cookie-path/53784228#53784228 ref: https://tools.ietf.org/html/rfc6265#section-5.1.4
Name |
Last commit
|
Last Update |
---|---|---|
.. | ||
auth_proxy | Loading commit data... | |
auth.go | Loading commit data... | |
auth_proxy.go | Loading commit data... | |
auth_test.go | Loading commit data... | |
cookie.go | Loading commit data... | |
dashboard_redirect.go | Loading commit data... | |
dashboard_redirect_test.go | Loading commit data... | |
headers.go | Loading commit data... | |
logger.go | Loading commit data... | |
middleware.go | Loading commit data... | |
middleware_basic_auth_test.go | Loading commit data... | |
middleware_test.go | Loading commit data... | |
org_redirect.go | Loading commit data... | |
org_redirect_test.go | Loading commit data... | |
perf.go | Loading commit data... | |
quota.go | Loading commit data... | |
quota_test.go | Loading commit data... | |
recovery.go | Loading commit data... | |
recovery_test.go | Loading commit data... | |
render_auth.go | Loading commit data... | |
request_metrics.go | Loading commit data... | |
request_tracing.go | Loading commit data... | |
testing.go | Loading commit data... | |
util.go | Loading commit data... | |
validate_host.go | Loading commit data... |