title: Rails - Method not allowed when executing POST methods (error 405)
body: <p>I come from this post:
  <a href="https://stackoverflow.com/questions/60073700/rails-using-puma-change-localhost3000-to-localhost3000-example">Rails using puma, change localhost:3000 to localhost:3000/example</a></p>
  
  <p>I have fixed this issue, but now I receive "Method not allowed" when I do a post request. I have been reading and tried this solution:
  <a href="https://stackoverflow.com/questions/31412688/post-returns-405-method-not-allowed?noredirect=1&amp;lq=1">Post returns 405 method not allowed</a></p>
  
  <p>I know where is the problem: If I put in application.rb lines 1- and 2-, all assets are shown correctly and post methods aren't doing it. If I comment these lines, methods works but assets don't.</p>
  
  <p>Application.rb:</p>
  
  <pre><code>class Application &lt; Rails::Application
      # Initialize configuration defaults for originally generated Rails version.
      config.load_defaults 5.1
  
      config.exceptions_app = -&gt;(env) { ExceptionController.action(:show).call(env) }
      config.action_dispatch.rescue_responses["BadTaste"] = :bad_request
  
      1- config.action_controller.asset_host = "https://www.sevilla.org"
      2- config.assets.prefix = '/autorizaciones-movilidad'
      # Settings in config/environments/* take precedence over those specified here.
      # Application configuration should go into files in config/initializers
      # -- all .rb files in that directory are automatically loaded.
    end
  </code></pre>
  
  <p>Routes:</p>
  
  <pre><code>Rails.application.routes.draw do
      #resources :assets, path: '/autorizaciones-movilidad'
      scope "/autorizaciones-movilidad" do
        get 'vehicles/new'
        get 'vehicles/create'
        ...
        get 'vehicles/update'
      end
  end
  </code></pre>
  
  <p>Controller structure:
  <a href="https://i.stack.imgur.com/ed3x3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ed3x3.png" alt="controller"></a></p>
  
  <p>Don't know how to solve it.</p>
  
  <p>It is deployed with a proxy server (in localhost it was working ok)</p>