Forum Discussion
ttadej
7 years agoAdvisor
The Common.init file can easily break your site. It's possible something with your code was slightly off, and that led to you losing access to all parts of the site (since it is in Common.init).
Here's what I've used to set cookies in Common.init without any issues:
<#assign newCookie = http.request.createCookie("cookieName", "value") /> ${newCookie.setMaxAge(28800)} <#--8 hours--> ${newCookie.setPath("/")} ${http.response.addCookie(newCookie)}
Related Content
- 9 years ago