Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Do not save session under certain conditions

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


Duncan.Garland at motortrak

May 21, 2012, 8:49 AM

Post #1 of 3 (231 views)
Permalink
Do not save session under certain conditions

Hi,

We've got some monitoring software installed which is accessing the home page of my catalyst app every couple of seconds and flooding the sessions table.

I can recognise the monitor based on the user agent, so I'd like to stop it saving the session. Something like:

if ($c->request->user_agent =~ m/HTTP-Monitor/ ) {
Don't save the session.
}

What's the best way to do this?

Thanks

Duncan


fobispo at isc

May 21, 2012, 9:31 AM

Post #2 of 3 (223 views)
Permalink
Re: Do not save session under certain conditions [In reply to]

can you get the monitor to initiate a session and re-use it?

That way, you can monitor other portions of the site and not just a no-op URL.


On May 21, 2012, at 8:49 AM, Duncan Garland wrote:

> Hi,
>
> We’ve got some monitoring software installed which is accessing the home page of my catalyst app every couple of seconds and flooding the sessions table.
>
> I can recognise the monitor based on the user agent, so I’d like to stop it saving the session. Something like:
>
> if ($c->request->user_agent =~ m/HTTP-Monitor/ ) {
> Don’t save the session.
> }
>
> What’s the best way to do this?
>
> Thanks
>
> Duncan
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/

Francisco Obispo
email: fobispo [at] isc
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
PGP KeyID = B38DB1BE


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


Duncan.Garland at motortrak

May 22, 2012, 3:37 AM

Post #3 of 3 (214 views)
Permalink
RE: Do not save session under certain conditions [In reply to]

Possibly, I'll have a chat with a couple of people.

However, it looked from the documentation as though what I proposed was possible. It looked like something could be put to the end action to do something with finalise_session. I wondered if anybody knew exactly what had to be done.

Duncan

-----Original Message-----
From: Francisco Obispo [mailto:fobispo [at] isc]
Sent: 21 May 2012 17:31
To: The elegant MVC web framework
Subject: Re: [Catalyst] Do not save session under certain conditions

can you get the monitor to initiate a session and re-use it?

That way, you can monitor other portions of the site and not just a no-op URL.


On May 21, 2012, at 8:49 AM, Duncan Garland wrote:

> Hi,
>
> We've got some monitoring software installed which is accessing the home page of my catalyst app every couple of seconds and flooding the sessions table.
>
> I can recognise the monitor based on the user agent, so I'd like to stop it saving the session. Something like:
>
> if ($c->request->user_agent =~ m/HTTP-Monitor/ ) {
> Don't save the session.
> }
>
> What's the best way to do this?
>
> Thanks
>
> Duncan
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/

Francisco Obispo
email: fobispo [at] isc
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC PGP KeyID = B38DB1BE


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.