Skip to content

Session always times out  #53

Description

@ManuelFrigerio

Hi,

I'm trying to proxy my blog, located at blog.mywebsite.com to mywebsite.com/blog.

I've followed the Readme and added this code to /config.rb

config.middleware.insert(0, Rack::ReverseProxy) do
    reverse_proxy_options preserve_host: false
    if Rails.env.production? or Rails.env.staging?
        reverse_proxy_options force_ssl: true, replace_response_host: true
    end
    reverse_proxy /^\/blog(\/?.*)$/, 'https://blog.mywebsite.com$1'
end

However when I try and visit mywebsite.com/blog it always times out.

It's also worth mentioning that it was working ok until I updated the gem.
Before I was just added this to my /config.ru file

use Rack::ReverseProxy do  
  reverse_proxy(/^\/blog(\/.*)$/,
    'https://blog.mywebsite.com$1',
    opts = {:preserve_host => true})
end  

run Rails.application

Can anyone please help me out?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions