We're debugging an issue with Akamai CDN where the server returns 412 - Precondition Failed on a persisted query retry.
The issue seems to be related to the "if-none-match" header included in the retry request. Is there a way to disable the header for POST requests? (they're not cached CDN-side anyway, so the header shouldn't be needed)
Hi! That's not a header we're adding on our end - if you search the codebase, you can see that if-none-match doesn't exist in the code of this repo. It does seem to show up when I run our Tutorial Demo app after a couple of requests - It looks like it's added by URLSession its caching settings.
From looking at some people running into similar problems It looks like you may need to either set the cache policy on the request or on the overall session configuration to something that ignores remote caching - looks like that'd be reloadIgnoringLocalAndRemoteCacheData from both that SO post and the available options.
Thank you @designatednerd , we fixed by ignoring the URLSession cache before th retry.
Cool - mind if we close this issue out then?
Most helpful comment
Hi! That's not a header we're adding on our end - if you search the codebase, you can see that
if-none-matchdoesn't exist in the code of this repo. It does seem to show up when I run our Tutorial Demo app after a couple of requests - It looks like it's added by URLSession its caching settings.From looking at some people running into similar problems It looks like you may need to either set the cache policy on the request or on the overall session configuration to something that ignores remote caching - looks like that'd be
reloadIgnoringLocalAndRemoteCacheDatafrom both that SO post and the available options.