New IHP Case Study: How AirPV is making the process of going solar easier and better value with IHP

Setting Cookies

peterbuckley17 PRO

I'd like to set cookies to manage access to a service via Cloudfront. Is there a best-practice way of setting a simple cookie {key}={value}?

I'm having trouble parsing through the Session cookie code for inspiration.

marc PRO

Right now this is not easily possible. As a workaround you could set the Set-Cookie header manually like this:

action MyAction = do
    setHeader ("Set-Cookie", "key = value")

I've created an issue on GitHub for adding helpers for this: