diff options
author | Struan Donald <struan@exo.org.uk> | 2012-04-03 10:37:39 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-04-03 10:37:39 +0100 |
commit | 592924059a07a5a30e8a09dfc4ca8dea56c5c77a (patch) | |
tree | c99e86d3e3f780427bbf7a9ec0ae5187b697dfa5 /perllib/Catalyst/Plugin/Session/State/Cookie.pm | |
parent | 65066d275557e16448aa99ecdfa4df62d4d79649 (diff) | |
parent | d92bbef188eff6c14adf0f0c7b032846b1be85a6 (diff) |
Merge remote-tracking branch 'origin/master' into send-report-rewrite
Conflicts:
bin/send-reports
perllib/FixMyStreet/Cobrand/Default.pm
perllib/FixMyStreet/Cobrand/FixMyStreet.pm
Diffstat (limited to 'perllib/Catalyst/Plugin/Session/State/Cookie.pm')
-rw-r--r-- | perllib/Catalyst/Plugin/Session/State/Cookie.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/Catalyst/Plugin/Session/State/Cookie.pm b/perllib/Catalyst/Plugin/Session/State/Cookie.pm index c4b61123b..e0a651ed9 100644 --- a/perllib/Catalyst/Plugin/Session/State/Cookie.pm +++ b/perllib/Catalyst/Plugin/Session/State/Cookie.pm @@ -50,6 +50,10 @@ sub update_session_cookie { sub cookie_is_rejecting { my ( $c, $cookie ) = @_; + # Don't output cookie for JS or JPEG files. mySociety addition + return 1 if substr($c->request->path, -3) eq '.js' + || substr($c->request->path, -5) eq '.jpeg'; + if ( $cookie->{path} ) { return 1 if index '/'.$c->request->path, $cookie->{path}; } |