title: Can't read swagger's doc in UI (Rails project, localhost)
body: <p>When I coming to <a href="http://localhost:3000/api/swagger" rel="nofollow noreferrer">http://localhost:3000/api/swagger</a>, I see in doc's address field <a href="http://api.webcrm.dev:3000/doc" rel="nofollow noreferrer">http://api.webcrm.dev:3000/doc</a>, and, as result, message <code>Can't read from server. It may not have the appropriate access-control-origin settings.</code> instead of my api's endpoints etc.</p>
  
  <p>I trying to find proper address to use it in localhost.</p>
  
  <p>in <strong>console</strong>:</p>
  
  <pre><code>Settings.api
  =&gt; {"url_options"=&gt;{"host"=&gt;"api.webcrm.dev", "port"=&gt;3000, "version"=&gt;"/v1/"},
   "swagger"=&gt;{"discovery_url"=&gt;{"host"=&gt;"api.webcrm.dev", "port"=&gt;3000, "path"=&gt;"/doc"}}}
  </code></pre>
  
  <p>in <strong>application.yml</strong>:</p>
  
  <pre><code>api:
    url_options:
      host: api.webcrm.dev
      port: 3000
      version: /v1/
    swagger:
      discovery_url:
        host: api.webcrm.dev
        port: 3000
        path: /doc
  </code></pre>
  
  <p>in <strong>config/initializers.010_swagger.rb</strong>:</p>
  
  <pre><code>GrapeSwaggerRails.options.url     = Settings.api.swagger.discovery_url.path
  GrapeSwaggerRails.options.app_url = "http://#{Settings.api.swagger.discovery_url.host}#{ ':' + Settings.api.swagger.discovery_url.port.to_s if Settings.api.swagger.discovery_url.port.present? }"
  </code></pre>
  
  <p>in <strong>routes.rb</strong>:</p>
  
  <pre><code>mount API =&gt; '/api' if ENV['ASSETS_PRECOMPILE'].blank?
    mount GrapeSwaggerRails::Engine =&gt; '/api/swagger'
    get '/api', to: redirect('/api/swagger')
  </code></pre>
  
  <p>But in logs output I see:</p>
  
  <pre><code>2020-02-19 12:11:07 +0700: HTTP parse error, malformed request (): #&lt;Puma::HttpParserError: Invalid HTTP format, parsing fails.&gt;
  2020-02-19 12:11:07 +0700: ENV: {"rack.version"=&gt;[1, 3], "rack.errors"=&gt;#&lt;IO:&lt;STDERR&gt;&gt;, "rack.multithread"=&gt;true, "rack.multiprocess"=&gt;false, "rack.run_once"=&gt;false, "SCRIPT_NAME"=&gt;"", "QUERY_STRING"=&gt;"", "SERVER_PROTOCOL"=&gt;"HTTP/1.1", "SERVER_SOFTWARE"=&gt;"puma 3.7.0 Snowy Sagebrush", "GATEWAY_INTERFACE"=&gt;"CGI/1.2"}
  ---
  </code></pre>
  
  <p>How can I find proper docs address and why it is not inputs automatically? Thank you so much for help!</p>
  
  <p>P.S.: 
  <code>
  Rails 4.2.11.1
  ruby 2.3.8p459
  </code></p>