I'm running my development app using puma-dev, which gives me the possibility to use SSL in development. This breaks the DevServerProxy on current master (7a1d306f367174e39c815bd298ab5d61cbbde72e), because it tries to connect to webpack-dev-server using SSL.
Here's the backtrace:
2017-08-17 16:24:32 +0200: Rack app error handling request { GET /packs/manager-782b5244ccbb002df6cc.js }
#<OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A>
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:44:in `connect_nonblock'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:44:in `ssl_socket_connect'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:948:in `connect'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:887:in `do_start'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:882:in `start'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-proxy-0.6.2/lib/rack/http_streaming_response.rb:71:in `session'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-proxy-0.6.2/lib/rack/http_streaming_response.rb:60:in `response'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-proxy-0.6.2/lib/rack/http_streaming_response.rb:29:in `headers'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:120:in `perform_request'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gems/webpacker-7a1d306f3671/lib/webpacker/dev_server_proxy.rb:13:in `perform_request'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/engine.rb:522:in `call'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in `call'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:602:in `handle_request'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:435:in `process_client'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:299:in `block in run'
/Users/grk/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
@grk Yepp, I know. Sorry about that. Will push a PR so the protocol can be configurable for dev server as well (at the moment it's hardcoded)
Can you explain the need for HTTPS in development?
There is no need, but since puma-dev supports it I've been using it from time to time. It gives more parity between development and production. Issues like mixed content can be caught earlier.
It might not be worth it: https://github.com/rails/webpacker/pull/665#issuecomment-323507054
Can you explain the need for HTTPS in development?
@dhh we use ApplePay in our app. And ApplePay won't run if page isn't served via HTTPS. Not even in development mode.
Gotcha. Gauraw merged the SSL option back in 👌
On Wed, Aug 23, 2017 at 3:25 PM, Patrik Bóna notifications@github.com
wrote:
Can you explain the need for HTTPS in development?
@dhh https://github.com/dhh we use ApplePay in our app. And ApplePay
won't run if page isn't served via HTTPS. Not even in development mode.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rails/webpacker/issues/660#issuecomment-324452194,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAKtfyXI5uPrCARY4YW7wbTJAtwTbxCks5sbIrDgaJpZM4O6WP0
.
Most helpful comment
Gotcha. Gauraw merged the SSL option back in 👌
On Wed, Aug 23, 2017 at 3:25 PM, Patrik Bóna notifications@github.com
wrote: