grafana-json-datasource
grafana-json-datasource copied to clipboard
Allowed cookies does not work
I am using JSON API (Ver: 1.3.2) with Express.js to request data from the backend, the grafana_session cookie is needed for some processing. However, when using Grafana version 9.2.6, the allowed cookies are not included in the request.
I have used cookieParser so it shouldn't be an issue with my backend. After testing, I figured out that from Grafana 9.1.8 until the latest version (9.3.1 for now), the allowed cookies function does not work. Also tested with older versions (1.2.1, 1.3.0) of this plugin, it doesn't work either.
Below is an image of me printing out the cookies in the request, which you can see is null.

@ChamXE, I just looked into grafana's source code, and they remove the possibility to pass the grafana_session cookie.
I was looking into this, and I can confirm that possibility to pass the grafana_session cookie was removed here https://github.com/grafana/grafana/commit/4539c33fce5ef23badb08ebcbc09cb0cecb1f539
hi @ChamXE as others explained, this is not possible anymore, for security reasons.