https redirect failing

0 views
Skip to first unread message

Darrin Eden

unread,
Aug 22, 2008, 2:29:39 PM8/22/08
to Fuzed
Hello Fuzed,
I'd like to use a reverse proxy that handles SSL encryption in front
of a Fuzed-hosted Rails app.
The app is designed to redirect a http request to a https uri scheme
in some cases. It appears the https portion of the uri as well as an
added x_forwarded_proto header set to https is not making it to the
app. The request subsequently fails with infinite redirections.
I'm poking through the code in an attempt to wrap my head around it,
but any pointers in the right direction would be most appreciated.

Thank you,
-- Darrin Eden

Darrin Eden

unread,
Aug 22, 2008, 3:20:32 PM8/22/08
to Fuzed
On Aug 22, 11:29 am, Darrin Eden <darrin.e...@gmail.com> wrote:

> as well as an added x_forwarded_proto header set to https is not making it to the app.

I answered my own question... I've included a trivial patch and
submitted a pull request on github as well.

Thanks,
-- Darrin

diff --git a/rlibs/fuzed_handler.rb b/rlibs/fuzed_handler.rb
index 97154e5..12af814 100644
--- a/rlibs/fuzed_handler.rb
+++ b/rlibs/fuzed_handler.rb
@@ -55,7 +55,8 @@ module Rack
'referer' => 'HTTP_REFERER',
'user_agent' => 'HTTP_USER_AGENT',
'X-Prototype-Version' =>
'HTTP_X_PROTOTYPE_VERSION',
- 'X-Requested-With' => 'HTTP_X_REQUESTED_WITH'}
+ 'X-Requested-With' => 'HTTP_X_REQUESTED_WITH',
+ 'X-Forwarded-Proto' => 'HTTP_X_FORWARDED_PROTO'}

env = {}
env['REQUEST_METHOD'] = method.to_s

David Fayram

unread,
Aug 22, 2008, 7:20:56 PM8/22/08
to fu...@googlegroups.com
Thanks Darrin. Your change has been pulled.

- dlf

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Fuzed" group.
> To post to this group, send email to fu...@googlegroups.com
> To unsubscribe from this group, send email to fuzed+un...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/fuzed?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

PGP.sig
Reply all
Reply to author
Forward
0 new messages