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

Vary header mechanism #868

Open
basaran opened this issue Apr 8, 2024 · 0 comments
Open

Vary header mechanism #868

basaran opened this issue Apr 8, 2024 · 0 comments
Labels

Comments

@basaran
Copy link

basaran commented Apr 8, 2024

Environment info:

Version: 2.6.0
Linux 6.7.7-1-MANJARO x86_64

Describe what are you trying to do:
I have a request header which limits the number of records returned from an API. I need to have Krakend pay attention to the Vary header.

To be on the safe side, I added Vary to the allowed headers.

      "allow_headers": [
        "Origin",
        "Authorization",
        "Content-Type",
        "Cache-Control",
        "prefer",
        "Vary"
      ],

I sent my request with the following headers:

Content-Type: application/x-www-form-urlencoded
User-Agent: insomnium/0.2.3-a
Cache-Control: max-age=604800
prefer: maxpagesize=10
Vary: prefer

When I change the value of the maxpagesize, I still hit the same cache. To be on the safe side, I also tried:

Content-Type: application/x-www-form-urlencoded
User-Agent: insomnium/0.2.3-a
Cache-Control: max-age=604800
prefer: maxpagesize=10
Vary: *

According to MDN, the asterisk implies cache should not be returned.

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

No branches or pull requests

1 participant