Skip to content

Commit

Permalink
[AppCheckCore] Skip local cache when making network requests (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 authored Oct 17, 2024
1 parent 87dd288 commit 4b265b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AppCheckCore/Sources/Core/APIService/GACAppCheckAPIService.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ - (instancetype)initWithURLSession:(NSURLSession *)session
__block NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestURL];
request.HTTPMethod = HTTPMethod;
request.HTTPBody = body;
// App Check should ignore cached data to prevent reusing
// previously received artifacts (e.g. App Attest challenge).
request.cachePolicy = NSURLRequestReloadIgnoringLocalCacheData;

if (self.APIKey) {
[request setValue:self.APIKey forHTTPHeaderField:kAPIKeyHeaderKey];
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 11.2.0
- [changed] To prevent reusing expired artifacts, skip local cache when making
network requests.

# 11.1.0
- [changed] Fall back to App Attest attestation phase if assertion phase fails
with DeviceCheck error.
Expand Down

0 comments on commit 4b265b9

Please sign in to comment.