Skip to content

Compression breaks file_server browse template using httpInclude #4352

@bones-was-here

Description

@bones-was-here

I have modified the default file_server browse template to integrate it with a website, by using httpInclude to load blocks of HTML containing the header, footer and theme. These files are hosted on the same Caddy instance, and it works well provided that compression is not enabled. When compression is enabled, the file_server browser becomes garbage: it appears that raw compressed data is included in the HTML served to the client.

Here is my Caddyfile workaround:

@not_integ {
        # FIXME: workaround for compression breaking httpInclude in templates
        not path /integ/*
}
encode @not_integ zstd gzip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions