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

Set proxy_ignore_headers to proxy-cache config block #11573

Open
josemrs opened this issue Sep 12, 2024 · 2 comments
Open

Set proxy_ignore_headers to proxy-cache config block #11573

josemrs opened this issue Sep 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@josemrs
Copy link

josemrs commented Sep 12, 2024

Description

We'd like to be able to set the proxy_ignore_headers in the proxy-cache config block

Use case: We want to cache responses no matter what's in the Cache-Control header so we need to set
proxy_ignore_headers Cache-Control;

Ideally this should be per route, as we configure the proxy-cache plugin per route. Our deployment relies in K8S APISIXRoute resources for configuration so I assume this will affect some other layers apart from the LUA tpl.

We have tested this in a live system by tweaking the nxg_tpl.lua file and reloading the config. After reloading the config the cache started HIT'ing just fine, whole before it was always MISS'ing

@dosubot dosubot bot added the enhancement New feature or request label Sep 12, 2024
@josemrs
Copy link
Author

josemrs commented Sep 12, 2024

I comment just to add: we found this by looking at Nginx doc here in particular the Can Cache-Control Headers Be Ignored? section

@josemrs
Copy link
Author

josemrs commented Sep 12, 2024

I though this may be doable using http_server_location_configuration_snippet added in this PR but I cannot find the way to set it from the helm chart I think it's missing there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant