trevorturk/flash_cookie_session — pull request #18 by JustQyx (2013-11-07 07:59:10+00:00)
Title: Fix cookies change when download swf files

when the browser download the swf from our server

```ruby
if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/ or env['HTTP_REFERER'] =~ /.swf/
# ...
end
```

this code will be executed, and then the cookie will be changed. So if the browser senf an ajax request, it will be fail with the error `Can't verify CSRF token authenticity`. And I have to sign in again!

So i think maybe it should only be

```ruby
if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/
# ...
end
```