Skip to content

Commit 9b9d608

Browse files
feat: support setting headers via env
1 parent 79cd441 commit 9b9d608

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

orb-java-core/src/main/kotlin/com/withorb/api/core/ClientOptions.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,14 @@ private constructor(
416416
(System.getProperty("orb.webhookSecret") ?: System.getenv("ORB_WEBHOOK_SECRET"))?.let {
417417
webhookSecret(it)
418418
}
419+
System.getenv("ORB_CUSTOM_HEADERS")?.let { customHeadersEnv ->
420+
for (line in customHeadersEnv.split("\n")) {
421+
val colon = line.indexOf(':')
422+
if (colon >= 0) {
423+
putHeader(line.substring(0, colon).trim(), line.substring(colon + 1).trim())
424+
}
425+
}
426+
}
419427
}
420428

421429
/**

0 commit comments

Comments
 (0)