Skip to content

Implementing compression algorithms (gzip, Brotli) in gondola #72

@bmf-san

Description

@bmf-san

Description

To reduce bandwidth usage and improve page load times, we need to add support for compression functionality in Gondola. This will include support for compression algorithms like gzip and Brotli.

Describe the feature you'd like to request

  • Support for multiple compression algorithms (gzip, Brotli, deflate)
  • Compression settings based on content types
  • Adjustable compression levels
  • Support for excluding specific paths from compression

Describe the solution you'd like

Extension of the configuration file:

proxy:
  compression:
    enable: true
    # Supported compression algorithms
    types: 
      - gzip
      - br
      - deflate
    
    # Compression level settings
    gzip_level: 6    # Range 1-9
    brotli_level: 4  # Range 0-11
    
    # MIME types to compress
    mime_types:
      - text/html
      - text/css
      - text/javascript
      - application/javascript
      - application/json
      - application/xml
      - text/xml
      - text/plain
      - image/svg+xml
    
    # Minimum file size to apply compression (in bytes)
    min_length: 1024
    
    # Paths to exclude from compression
    exclude_paths:
      - "*.gif"
      - "*.jpeg"
      - "*.png"
      - "*.webp"
      - "*.mp4"
      - "*.mp3"

Metadata

Metadata

Assignees

No one assigned

    Labels

    ADRArchitecture decision recordenhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions