Application.cfc - setClientCookies isn't getting respected

Hi,

I have the following in an Application.cfc file. I am using Lucee 4.5.1

I am finding that even though I have set SetClientCookies to be “no”, as
soon as I reference Session.CFID, Lucee will create a session for me and
also create the CFID/CFToken cookies which gets sent to the browser.
This looks a bug to me, since when I was using the cfapplication tag
instead of Application.cfc, I was able to SetClientCookies to “no”,
reference Session.CFID and not have the CFID/CFToken cookies created.

Does anyone have any ideas on how I can work around this issue?

Cheers,
Kaye.

Just a gentle prod … does anyone have any ideas about this?

Thanks!
Kaye.On Friday, October 16, 2015 at 3:11:16 PM UTC+11, kay...@gmail.com wrote:

Hi,

I have the following in an Application.cfc file. I am using Lucee 4.5.1

I am finding that even though I have set SetClientCookies to be “no”, as
soon as I reference Session.CFID, Lucee will create a session for me and
also create the CFID/CFToken cookies which gets sent to the browser.
This looks a bug to me, since when I was using the cfapplication tag
instead of Application.cfc, I was able to SetClientCookies to “no”,
reference Session.CFID and not have the CFID/CFToken cookies created.

Does anyone have any ideas on how I can work around this issue?

Cheers,
Kaye.

Hi Kaye

I can replicate this, but it seems only if the variable is set in the
body of Application.cfc as per your code.

If I set the “blah” variable in the onSessionStart() or
onRequestStart() functions, or in a template outside of app.cfc, no
cookies are sent to the browser.

Presumably you are wanting to set your own cookies using the
session.cfid and session.cftoken values, in which case can you move
that logic to onSessionStart()?

Cheers
Julian.On 20 October 2015 at 22:10, <@kaye.ng> wrote:

I have the following in an Application.cfc file. I am using Lucee 4.5.1

I am finding that even though I have set SetClientCookies to be “no”, as
soon as I reference Session.CFID, Lucee will create a session for me and
also create the CFID/CFToken cookies which gets sent to the browser.
This looks a bug to me, since when I was using the cfapplication tag instead
of Application.cfc, I was able to SetClientCookies to “no”, reference
Session.CFID and not have the CFID/CFToken cookies created.

Does anyone have any ideas on how I can work around this issue?

Thanks Julian. That worked a charm :slight_smile:

Cheers,
Kaye.On Wednesday, October 21, 2015 at 8:29:14 AM UTC+11, Julian Halliwell wrote:

Hi Kaye

I can replicate this, but it seems only if the variable is set in the
body of Application.cfc as per your code.

If I set the “blah” variable in the onSessionStart() or
onRequestStart() functions, or in a template outside of app.cfc, no
cookies are sent to the browser.

Presumably you are wanting to set your own cookies using the
session.cfid and session.cftoken values, in which case can you move
that logic to onSessionStart()?

Cheers
Julian.

On 20 October 2015 at 22:10, <kay...@gmail.com <javascript:>> wrote:

I have the following in an Application.cfc file. I am using Lucee 4.5.1

I am finding that even though I have set SetClientCookies to be “no”, as
soon as I reference Session.CFID, Lucee will create a session for me and
also create the CFID/CFToken cookies which gets sent to the browser.
This looks a bug to me, since when I was using the cfapplication tag
instead
of Application.cfc, I was able to SetClientCookies to “no”, reference
Session.CFID and not have the CFID/CFToken cookies created.

Does anyone have any ideas on how I can work around this issue?