我已经设置了 apache .htaccess 文件,以便它应该压缩我的应用程序喷出的 JSON。该应用程序是用 python 编写的,并通过 CGI 脚本链接到 apache。
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript text/json application/json
</ifmodule>
我返回的 JSON 仍然不是 GZipped,尽管返回的静态文件是。关于如何解决这个问题有什么想法或想法吗?
我正在使用 Apache2