summaryrefslogtreecommitdiff
path: root/etc/apache2/conf-available/local-compression.conf
blob: 03d4299b36216e88fc69202e4535724a0a41fb0b (plain)
  1. # TODO: support serving pre-compressed files using Multi-Views
  2. # <https://kevinlocke.name/bits/2016/01/20/serving-pre-compressed-files-with-apache-multiviews/>
  3. <IfDefine !TRANSFER_COMPRESSION>
  4. <IfModule mod_brotli.c>
  5. Define TRANSFER_COMPRESSION BROTLI_COMPRESS
  6. </IfModule>
  7. </IfDefine>
  8. <IfDefine !TRANSFER_COMPRESSION>
  9. <IfModule mod_deflate.c>
  10. Define TRANSFER_COMPRESSION DEFLATE
  11. </IfModule>
  12. </IfDefine>
  13. <IfDefine TRANSFER_COMPRESSION>
  14. <IfModule mod_filter.c>
  15. AddOutputFilterByType ${TRANSFER_COMPRESSION} text/html text/plain text/xml text/css text/javascript
  16. AddOutputFilterByType ${TRANSFER_COMPRESSION} application/x-javascript application/javascript application/ecmascript
  17. AddOutputFilterByType ${TRANSFER_COMPRESSION} application/rss+xml
  18. AddOutputFilterByType ${TRANSFER_COMPRESSION} application/xml
  19. </IfModule>
  20. </IfDefine>