Skip to content

Commit

Permalink
chore: Add no store for the cache in urlsession (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
royjit authored Dec 27, 2022
1 parent 8f572c1 commit d184013
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ public class StarscreamAdapter: AppSyncWebsocketProvider {
serialQueue.async {
AppSyncLogger.verbose("[StarscreamAdapter] connect. Connecting to url")
var urlRequest = URLRequest(url: url)
urlRequest.setValue("no-store", forHTTPHeaderField: "Cache-Control")

let protocolHeaderValue = protocols.joined(separator: ", ")
urlRequest.setValue(protocolHeaderValue, forHTTPHeaderField: "Sec-WebSocket-Protocol")

self.socket = WebSocket(request: urlRequest)
self.delegate = delegate
self.socket?.delegate = self
Expand Down

0 comments on commit d184013

Please sign in to comment.