Michael MacDonald

Posts Tagged ‘paperclip’

Protecting paperclip files with nginx

In Rails on July 12, 2009 at 10:26 pm

In a Rails app I’m working on, there is a model that can have attachments and the paperclip gem is used to handle this. However, these files need to only be available to logged in users. They cannot be directly accessible to the public. For this, I used nginx’s X-Accel-Redirect response header. But, I couldn’t get it to work!

Read the rest of this entry »