1
當我訪問我的facebook iframe應用程序時出現此錯誤:Rails Facebook iframe應用程序錯誤:InvalidAuthenticityToken
The change you wanted was rejected.
Maybe you tried to change something you didn't have access to.
Heroku日誌:
2011-06-05T08:30:41+00:00 app[web.1]: Started POST "/facebook/" for xxxx
03 at 2011-06-05 10:30:41 +0200
2011-06-05T08:30:41+00:00 heroku[router]: POST www.vinderhimlen.dk/facebook/ dyn
o=web.1 queue=0 wait=0ms service=39ms bytes=711
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:41+00:00 app[web.1]: ActionController::InvalidAuthenticityToken
(ActionController::InvalidAuthenticityToken):
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:45+00:00 heroku[web.1]: Stopping process with SIGTERM
2011-06-05T08:30:45+00:00 app[web.1]: >> Stopping ...
2011-06-05T08:30:45+00:00 heroku[web.1]: Process exited
[email protected] /c/rails/konkurranceportalen (master)
$
我已經加入skip_before_filter:verify_authenticity_token它仍然給出了同樣的錯誤 – 2011-06-05 11:00:20
嘗試從控制器/ application_controller.rb – 2011-06-05 11:25:02
現在,它的工作原理去除'protect_from_forgery':) – 2011-06-05 12:02:05