fix: adminKey ignored
This commit is contained in:
@@ -31,14 +31,14 @@ object LNbitsClient {
|
||||
|
||||
fun create(secrets: SecretStore): LNbitsApi {
|
||||
// Auth header interceptor — reads invoice key per-request (unchanged)
|
||||
val authInterceptor = Interceptor { chain ->
|
||||
val key = runBlocking { secrets.invoiceKey() }
|
||||
chain.proceed(
|
||||
chain.request().newBuilder()
|
||||
.header("X-Api-Key", key)
|
||||
.build()
|
||||
)
|
||||
}
|
||||
// val authInterceptor = Interceptor { chain ->
|
||||
// val key = runBlocking { secrets.invoiceKey() }
|
||||
// chain.proceed(
|
||||
// chain.request().newBuilder()
|
||||
// .header("X-Api-Key", key)
|
||||
// .build()
|
||||
// )
|
||||
// }
|
||||
|
||||
// Dynamic base URL interceptor — rewrites the placeholder host to the
|
||||
// real base URL at request time, not at Retrofit construction time.
|
||||
@@ -65,7 +65,7 @@ object LNbitsClient {
|
||||
}
|
||||
|
||||
val client = httpClient.newBuilder()
|
||||
.addInterceptor(authInterceptor)
|
||||
// .addInterceptor(authInterceptor)
|
||||
.addInterceptor(dynamicBaseUrlInterceptor)
|
||||
.apply {
|
||||
// Logging goes LAST — after URL rewrite — so logs show the real URL
|
||||
|
||||
Reference in New Issue
Block a user