I am using gem 'griddler' with gem 'griddler-sendgrid' in my ruby on rails app for incoming mails.
It is working fine on staging server but getting issue with production server. There is no issue in my configuration, I have confirmed this with sendgrid support
. They told me to use only DKIM validation
and remove SPF check
from validations.
I have checked both gem for that but didn't find anything relevant to that.
Here is my gem configuration details:
ruby '2.2.3'
gem 'rails', '4.1.2'
gem 'griddler', '1.4.0'
gem 'griddler-sendgrid', '1.0.0'
Can someone suggest me how can I skip SPF check validation in gem 'griddler-sendgrid'?
Thanks in advance!
Tried getting emails_controller.rb from github ?
https://github.com/thoughtbot/griddler
"fix ArgumentError with verify_authenticity_token on Rails API"
I've added
protect_from_forgery with: :null_session
I think that null_session should be used in API controllers with no use for the session. It provides an empty session during request.
https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html
In a controllers folder griddler add a new file from the Griddler github, or try the code below.
/controllers/griddler/emails_controller.rb
Not fully sure with the whole solution, but hope it will help to get some more direction.