Rails: Remove unnecessary Middleware

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.