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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Add header when proxing

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2006, 06:43 PM
zhesto zhesto is offline
Member
 
Join Date: Jun 2006
Posts: 11
Default Add header when proxing

Hi,
I'm using litespeed-2.1.16 to proxy requests to backend web server (Ruby on Rails with Mongrel). When using HTTPS I need to add a special header to the request, so the backend server will understand that the initial request is over HTTPS. For example with pound reverse proxy (see http://mongrel.rubyforge.org/docs/pound.html ):
Code:
AddHeader "X-Forwarded-Proto: https"
For Apache:
Code:
RequestHeader set X_FORWARDED_PROTO 'https'
How to add such a header with LiteSpeed?
Reply With Quote
  #2  
Old 06-19-2006, 08:35 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
That header will be added automatically by LSWS 2.1.17. The new release will be announced soon. Actaully, you can downalod it now.
Reply With Quote
  #3  
Old 06-19-2006, 10:55 PM
zhesto zhesto is offline
Member
 
Join Date: Jun 2006
Posts: 11
Quote:
Originally Posted by mistwang
That header will be added automatically by LSWS 2.1.17. The new release will be announced soon. Actaully, you can downalod it now.
Thank you very much. You made my day Just for the record (maybe can help somebody) - what I'm doing in the moment:
Code:
# app/controller/application.rb
def require_ssl
  env['HTTPS'] = 'on' unless (@request.ssl? or local_request?)
end

# app/controller/othercontroller.rb
before_filter :require_ssl
# or: before_filter :require_ssl, :only => [:some_action]
# or: before_filter :require_ssl, :except => [:some_action]
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Premature end of response header, and 503 service errors (maybe related, maybe not) fantasydreaming Bug Reports 13 12-11-2006 04:21 PM
Premature end of response header alex Bug Reports 10 06-11-2006 07:48 AM
cache-control header henpa Install/Configuration 3 03-25-2006 02:47 AM
Max Dynamic Response Header Size (bytes) ??? ts77 Install/Configuration 7 07-14-2005 08:34 AM
dumping large request header? ts77 Install/Configuration 1 07-04-2005 07:55 AM


All times are GMT -7. The time now is 02:39 PM.



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