grafana/pkg/middleware
Erik Sundell d94796a022
Auth: Remove trailing / in cookies' path (#22265) (#22265)
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
2020-04-06 17:56:19 +03:00
..
auth_proxy AuthProxy: Fixes bug where long username could not be cached (#22926) 2020-03-20 21:50:27 +01:00
auth_proxy.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
auth_test.go Snapshot: Fix http api (#18830) 2019-09-02 15:15:46 +02:00
auth.go API: Fix redirect issues (#22285) 2020-03-11 11:04:48 +02:00
cookie.go Auth: Remove trailing / in cookies' path (#22265) (#22265) 2020-04-06 17:56:19 +03:00
dashboard_redirect_test.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
dashboard_redirect.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
headers.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
logger.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
middleware_basic_auth_test.go pkg/util: Check errors (#19832) 2019-10-23 10:40:12 +02:00
middleware_test.go Auth: Remove trailing / in cookies' path (#22265) (#22265) 2020-04-06 17:56:19 +03:00
middleware.go Rendering: Store render key in remote cache (#22031) 2020-02-19 19:47:39 +01:00
org_redirect_test.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
org_redirect.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
perf.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
quota_test.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
quota.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
recovery_test.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
recovery.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
render_auth.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
request_metrics.go Metrics: Add gauge for requests currently in flight (#22168) 2020-02-19 18:29:47 +01:00
request_tracing.go mark >=400 responses as error 2017-09-18 11:08:58 +02:00
testing.go Auth: Do not search for the user twice (#18366) 2019-08-03 21:50:05 +02:00
util.go Backend Plugins: Support handling of streaming resource response (#22580) 2020-03-06 01:44:07 +07:00
validate_host.go chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00