fusionauth-issues
fusionauth-issues copied to clipboard
Provide a standard way to read request cookies in Freemarker templates
Provide a standard way to read request cookies in Freemarker templates
Problem
Request cookies are accessible in Fusionauth 1.36.4 by "request.cookies" but no more supported by the same access method in Fusionauth 1.39.0
Solution
Provide a standard way to read request cookies in Freemarker templates.
Alternatives/workarounds
The following code snippet works in 1.39.0 but clumsy.
[#local cookies = request.getHeader("cookie")/] [#if cookies??] [#list cookies?split(";") as cookie] [#local keyVal = cookie?split("=")/] {keyVal[0]?trim?string} {keyVal[1]?trim?string} [/#list] [/#if]
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
How to vote
Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.
Internal:
- https://github.com/FusionAuth/fusionauth-app/pull/144