문제

Here is my situation. I am testing out Varnish on my local box (I'm doing some stuff related to page caching that would be a big pain to push to staging every time). Everything works fine, except whenever I submit a form, I get an ActionController::InvalidAuthenticityToken exception.

Varnish is running on localhost at port 6081, and Thin is running on localhost at port 80. I get the exception when I try to use the site using port 6081.

Is there any way I can get around this?

도움이 되었습니까?

해결책

Okay, so the reason this was failing was my VCL file was clearing out all cookies on every request. Obviously, this would cause some issues with the authenticity token.

Silly fix for a silly problem :/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top