I found go implementation of CORS and it adds on every CORS request following headers:
headers.Add("Vary", "Origin")
headers.Add("Vary", "Access-Control-Request-Method")
headers.Add("Vary", "Access-Control-Request-Headers")
https://github.com/rs/cors/blob/f9bce55a4e61e3d1a061993e3453eb9848fcdc4d/cors.go#L269
But as far as I know OPTIONS method is not cacheable?
So why they add that Vary header?
OPTIONS method can be cached by intermediary caches.
For example:
If you want OPTIONS responses to be cached, do the following:(...)
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With