LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Ruby/Rails (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=20)
-   -   sendfile (http://www.litespeedtech.com/support/forum/showthread.php?t=903)

thijs 03-04-2007 01:55 PM

sendfile
 
I would like to start using the sendfile feature in Litespeed to serve files that are selected from the filesystem by my Rails app.

I had a look at the sendfile gem but it's not obvious to me how this could be used with Litespeed. Is there anybody that has tried this?

mistwang 03-04-2007 02:53 PM

Please checkout our wiki

http://www.litespeedtech.com/support...ernal_redirect

thijs 03-12-2007 03:56 AM

Thanks, I know about that.

That solution feels to much like security through obscurity to me. I don't feel comfortable putting those files on a publicly accessible location. And somebody could download every single file if the secret location would leak.

Or is there a way to close off the file location?

mistwang 03-12-2007 09:50 AM

To block direct access to a directory, just add a rewrite rule at vhost level like

RewriteCond %{REQUEST_URI} ^/blocked/uri/
RewriteRule ^/blocked/uri/ - [R=403,F]

REQUEST_URI is the same as the current URI when accessing the file directly, however, when a request was internally redirected, Current URI is the "/blocked/uri/", while REQUEST_URI is the URI in the original request header.


All times are GMT -7. The time now is 02:53 AM.