Merge pull request #3554 from vector-im/http_additional_headers

Http Additional Headers
This commit is contained in:
ismailgulek 2020-08-20 12:06:10 +03:00 committed by GitHub
commit aecf6f7caa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

View file

@ -8,6 +8,7 @@ Improvements:
* Config fixes.
* Introduce TableViewSections. Refactor RoomSettingsViewController & SettingsViewController.
* AuthenticationVC: Make forgot password button and phone number text field configurable.
* Introduce httpAdditionalHeaders in BuildSettings.
Bugfix:
* Fix biometry name null case (#3551).

View file

@ -198,6 +198,11 @@ final class BuildSettings: NSObject {
static let messageDetailsAllowViewSource: Bool = true
static let messageDetailsAllowSave: Bool = true
// MARK: - HTTP
/// Additional HTTP headers will be sent by all requests. Not recommended to use request-specific headers, like `Authorization`.
/// Empty dictionary by default.
static let httpAdditionalHeaders: [String: String] = [:]
// MARK: - Authentication Screen
static let authScreenShowRegister = true

View file

@ -64,6 +64,9 @@ class CommonConfiguration: NSObject, Configurable {
// Use UIKit BackgroundTask for handling background tasks in the SDK
sdkOptions.backgroundModeHandler = MXUIKitBackgroundModeHandler()
// Pass httpAdditionalHeaders to the SDK
sdkOptions.httpAdditionalHeaders = BuildSettings.httpAdditionalHeaders
}

View file

@ -11,7 +11,7 @@ use_frameworks!
# - `{ {kit spec hash} => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for each repo. Used by Fastfile during CI
#
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
$matrixKitVersion = '= 0.12.13'
$matrixKitVersion = '= 0.12.14'
# $matrixKitVersion = :local
# $matrixKitVersion = {'develop' => 'develop'}