LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > sending static files from Rails using litespeed

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2008, 07:50 AM
Shelby Shelby is offline
Member
 
Join Date: Aug 2006
Location: Dallas, TX
Posts: 22
Default sending static files from Rails using litespeed

On my rails site, (served by Litespeed) I have a number of pdf files that should be accessible to members only. Currently I have them located in a subdirectory of the rails "public" directory. This, of course, does not restrict access to them.

Within rails, I could call the send_file method, and locate the pdf within my rails directory structure, thereby restricting access only to authorized users. But I have been told that rails should not be serving static files, because that is the responsibility of the web server.

I have read that in Apache, I could set a special HTTP request header with the path to the file I want the web server to send, like:
response.headers[`X-Sendfile'] = path

Does this work in Litespeed?

Thanks...
Reply With Quote
  #2  
Old 04-25-2008, 08:30 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
http://www.litespeedtech.com/support...ernal_redirect
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:09 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.