Protecting the content of public/ in a Rails app

后端 未结 5 1118
刺人心
刺人心 2020-12-23 17:48

I\'m maintaining a Rails app that has content in the public/ folder that will now need to be protected by a login. We\'re considering moving those folders of files into a p

5条回答
  •  梦毁少年i
    2020-12-23 18:24

    AFAIK, X-SendFile is not supported by nginx. Nginx has its own extension allowing this, called X-Accel-Redirect.

    You will find more information about this here : https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/

    There is also a rails plugin implementig this feature, on github: goncalossilva/X-Accel-Redirect

提交回复
热议问题