Skip to content

Request from SSL app to non-ssl application - How to disable SSL for redirected req? #83

@geedon

Description

@geedon

I have an SSL enabled application and I'm redirecting a specific request to an older application, in order to avoid CORS issues. In fact this is a .Net application that will process print requests but it does not support SSL. The redirected request tries to connect with SSL resulting with the following in the Rails app logs...

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3/TLS write client hello: wrong version number):

The other application simply doesn't support SSL so its nothing to do with verifying SSL certificates or SSL version numbers.

Currently I'm using the following function, which works a treat when the app is not running in under SSL....

`def perform_request(env)

request = Rack::Request.new(env)

if request.path.include? "proxy_process_dispatch"

  env["http.read_timeout"] = (OFFICE_PRINT_TIMEOUT / 1000) - 1

  env["HTTP_HOST"] = OFFICE_IP + ':' + OFFICE_PRINT_SERVER_PORT     

  puts 'Redirecting dispatch process request to: ' + env["HTTP_HOST"] + '. Read timeout set to ' + env["http.read_timeout"].to_s

  env["REQUEST_PATH"] = "/?process=true"

  super(env)

else

  @app.call(env)

end

end

`

Can you help me to disable SSL for this specific request?

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