Skip to content

Grape v1.4.0 regression: Cache-Control is always set to no-cache #2087

Closed
@stanhu

Description

@stanhu

In Grape v1.4.0 https://github.com/ruby-grape/grape/pull/1520/files#diff-8e15cddb80f42ca7d43872846d80ecbeR275 broke our test suite because Cache-Control is always set to no-cache in

header 'Cache-Control', 'no-cache' # Skips ETag generation (reading the response up front)
.

We set Cache-Control to max-age=0, private, must-revalidate, no-store, no-cache.

Maybe we should appendno-cache only if isn't present? Or maybe the headers shouldn't be touched if nil is returned?

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