References:
Http://edgeguides.rubyonrails.org/rails_on_rack.html
Add the following settings to application. Rb (refer to the suggestions in Robbin's blog http://robbinfan.com/blog/40/ruby-off-rails ):
Config. middleware. delete 'rack: cache' # the entire page cache, which cannot be used. middleware. delete 'rack: lock' # multi-thread locking, meaningless in multi-process mode # config. middleware. delete 'rack: runtime' # record X-Runtime (to facilitate the client to view the execution time) config. middleware. delete 'actiondispatch: requestid' # record X-request-ID (which allows you to conveniently view which server of the request is executed in the cluster) config. middleware. delete 'actiondispatch: remoteip' # IP spoofattack config. middleware. delete 'actiondispatch: callbacks' # Set callback config before and after the request. middleware. delete 'actiondispatch: head' # if it is a head request, it is executed according to the GET request, but no body config is returned. middleware. delete 'rack: conditionalget' # config is used for HTTP client caching. middleware. delete 'rack: etag' # config is used for HTTP client caching. middleware. delete 'actiondispatch: beststandardssupport '# set X-UA-compatible and set it on nginx