platformOS Community

Can I set a cookie server-side?

Adam Cook Dec 18 2020 at 16:17

I'd like to control my cookies server-side instead of relying on js. Can we do this?

Maciej.Krajowski Dec 18 2020 at 16:22

Currently your only option is to use session tag to set a value server side for the current user session.

  • Adam Cook Dec 18 2020 at 16:36
    But that won't show up as a cookie, correct? Will we eventually have the ability to set cookies?
  • Maciej.Krajowski Dec 18 2020 at 16:50
    Correct. And yes, there is no technical reason to not allow setting cookies in the future.
Rich - One Orange Cow Dec 21 2020 at 01:00

It is still a cookie, but destroyed once the session ends :)

The solution is for POS to allow expiry times and path (prefered - but I can see a security risk there) or greater control over headers so we can set our own SS cookies.

  • Adam Cook Dec 25 2020 at 01:44
    It may be technically true that a session variable is a cookie, but it kind of misses the point. I'm talking about cookies that can be read from the client-side.
  • Rich - One Orange Cow Dec 30 2020 at 02:37
    Cookies are cookies, session or not, you can read the values of cookies set by POS client side in JS if you wish
Please sign in or fill up your profile to answer a question