我正在尝试对我的应用程序实施压缩。与启用中间件for(int i = 1; i <= 6; i++)
System.out.println(lexicographicPermutation("110", i));
1 - 110
2 - 101
3 - 110
4 - 101
5 - 011
6 - 011
for(int i = 1; i <= 6; i++)
System.out.println(lexicographicPermutation("abc", i));
1 - abc
2 - acb
3 - bac
4 - bca
5 - cab
6 - cba
或config.middleware.use Rack::Deflater
相比,在config.middleware.insert_before ActionDispatch::Static, Rack::Deflater
中实现中间件有何不同
config/application.rb
中的config.assets.gzip = true
吗?
参考:
https://robots.thoughtbot.com/content-compression-with-rack-deflater#rails-3-and-4 https://guides.rubyonrails.org/asset_pipeline.html#serving-gzipped-version-of-assets