Skip to content

Commit e7fea4a

Browse files
authored
feat: client identification headers (#103)
1 parent 0e1eb96 commit e7fea4a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

unleashandroidsdk/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ android {
2222
namespace = "io.getunleash.android"
2323
compileSdk = 34
2424

25+
buildFeatures {
26+
buildConfig = true
27+
}
28+
2529
defaultConfig {
2630
minSdk = 21
2731

@@ -30,6 +34,8 @@ android {
3034
}
3135
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3236
consumerProguardFiles("proguard-rules.pro")
37+
38+
buildConfigField("String", "VERSION", "\"${project.version}\"")
3339
}
3440

3541
buildTypes {

unleashandroidsdk/src/main/java/io/getunleash/android/UnleashConfig.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ data class UnleashConfig(
4444
"Authorization" to auth,
4545
"Content-Type" to "application/json",
4646
"UNLEASH-APPNAME" to appName,
47+
"X-UNLEASH-APPNAME" to appName,
4748
"User-Agent" to appName,
4849
"UNLEASH-INSTANCEID" to instanceId,
50+
"X-UNLEASH-CONNECTION-ID" to instanceId,
51+
"X-UNLEASH-SDK" to "unleash-client-android:" + BuildConfig.VERSION,
4952
))
5053
}
5154

0 commit comments

Comments
 (0)