Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return cached header fields #292

Open
vanderGoes opened this issue Sep 4, 2023 · 2 comments
Open

Return cached header fields #292

vanderGoes opened this issue Sep 4, 2023 · 2 comments

Comments

@vanderGoes
Copy link

The current functionality of fastapi-cache is not returning the cached headers, only the cached body with the regular headers. This limitation is affecting the possible usage of this package in a ForwardAuth middleware of Traefik.

Adding this as a custom method via the @cache decorator is not available.

Can we enable returning the headers by:

  • adding a flag to cache and return all headers
  • or via a custom method (like key_builder) to return selected headers?
@lvijnck
Copy link

lvijnck commented Sep 4, 2023

+1

1 similar comment
@bobunist
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants