Closed dblanken closed 2 years ago
I'm going to put my foot down and say this needs to be auto-detected. We already do that with the host and port. Mixing an auto-detected host and port with a global configuration option is a worst of all worlds scenario.
Possible approach 1: Use curl/wget to try each of HTTP and HTTPS. This could become part of the detection process in s:app_server_binding()
, changing the interface to return the URI scheme as well.
Possible approach 2: Check a config file for the appropriate option (assuming this is something that's specified in a config file).
Possible approach 3: Use ps
to check the server command line for a flag like --ssl
(assuming this is something that's specified on the command line).
By default, vim-rails uses http for localhost connections when using :Preview, however some projects I have been working on enforce https in the development environment. This change allows you to override the http default to use https if desired with the g:rails_uri_scheme variable.