Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rack_response ETAG is weakly generated #703

@prem-prakash

Description

@prem-prakash

The rack_response plugin ETAG response header is generated based on attributes that can remain the same even if the file content has been changed.

        # Value for the "ETag" header.
        def etag
          digest = Digest::SHA256.hexdigest("#{file.shrine_class}-#{file.storage_key}-#{file.id}")

          %(W/"#{digest.byteslice(0, 32)}")
        end

This may result in unwanted response caching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions