I'm running rails 3 with jruby and trinidad, and I keep seeing these log messages:
INFO http-bio-3001-exec-15 jruby.rack - cache: [POST /something] invalidate, pass
What exactly does this mean? Also, the code in the controller is also never run. Is this an issue with caching?
Whenever Rails receives a POST request, it performs some security checks to make sure the request is "valid". The checks are performed by parsing CSRF authenticity tokens which MUST be submitted along with the form in a POST request.
If you're not able to edit the form that is making the request to your rails app, you can skip the check on controller-by-controller basis:
class Foo < ApplicationController
skip_before_filter :verify_authenticity_token
or you can also choose to do so for a specific method in the controller:
class Foo < ApplicationController
skip_before_filter :verify_authenticity_token, :only => [:create]
You can read about it here
cache: [POST /something] invalidate, pass
This is saying a POST request was issued and the invalidate, pass means that a cache couldn't be used for this type of request. You'll get the invalidate, pass for any change request (POST, PUT, DELETE etc)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With