Skip to content

Commit

Permalink
Merge branch 'mlin/PR/FixCensorshipCircumvention' into release/5.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmchen-signal committed Sep 7, 2021
2 parents f511bcb + 0aadc2d commit cca8c81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SignalServiceKit/src/Network/API/RESTNetworkManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public class RESTSessionManager: NSObject {
value: OWSURLSession.signalIosUserAgent,
overwriteOnConflict: true)

if signalService.isCensorshipCircumventionActive {
httpHeaders.addHeader("Host", value: TSConstants.censorshipReflectorHost, overwriteOnConflict: true)
}

// Then apply any custom headers for the request
httpHeaders.addHeaders(request.allHTTPHeaderFields, overwriteOnConflict: true)

Expand Down

0 comments on commit cca8c81

Please sign in to comment.