Skip to content

Feature: Allow using inode in ETags #7730

@bb4242

Description

@bb4242

Issue Details

It would be nice to be able to configure caddy to include file inodes when calculating ETags, similar to Apache.

My use case involves serving static files from the nix store, (see NixOS/nixpkgs#222354), where the files' modification times are always 1, per nix's reproducibility guarantees. In this case, caddy skips ETag generation entirely (#5548), which can cause caching problems where browsers fail to detect that files have changed. The currently recommended approach in the nix world seems to be to strip the Last-Modified header also, which forces browsers to re-fetch assets every time. This works, but leads to unnecessary overhead.

I think it would be nice if it were possible to configure caddy to still calculate ETags, based on file size and inode number, rather than skipping ETag generation entirely. Using inode number has some downsides, such as in load balancing scenarios, but would be very useful in single server cases.

Assistance Disclosure

AI not used

If AI was used, describe the extent to which it was used.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussion 💬The right solution needs to be foundfeature ⚙️New feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions