Neseek77 / mconf

Automatically exported from code.google.com/p/mconf
0 stars 0 forks source link

The "captcha" isn't working on the register page #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The image of the captcha is not showing properly. This is on 
http://mconfweb.inf.ufrgs.br/signup

Original issue reported on code.google.com by fceca...@gmail.com on 11 May 2011 at 11:01

GoogleCodeExporter commented 9 years ago
Fixed. Needed a specific configuration for nginx. 

Solution found at: 
http://www.mail-archive.com/heroku@googlegroups.com/msg06836.html

simple_captcha uses send_file to send the image to the browser, so you need to 
enable XSendfile in the production environment (environments/production.rb) 
with:

    config.action_dispatch.x_sendfile_header = "X-Sendfile"

Nginx uses X-Accel-Redirect instead, so the solution is a bit different. See 
http://wiki.nginx.org/XSendfile

    config.action_dispatch.x_sendfile_header = "X-Accel-Redirect"

More details at: http://stackoverflow.com/questions/5888681/in-my-rails-3
-app-simple-captcha-doesnt-display-image-on-production-mode/5982649#comment-6924
795

Original comment by leonardo...@gmail.com on 16 May 2011 at 1:40