Skip to content

Commit 724ba83

Browse files
authored
Merge pull request #233 from kabhijeet/main
fix: #232 Update Authorization header logic for API requests
2 parents cbff647 + 52fa19b commit 724ba83

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/Fluid/Services/LLMClient.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ final class LLMClient {
267267
request.httpMethod = "POST"
268268
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
269269

270-
// Only add Authorization header for non-local endpoints
271-
if !isLocal && !config.apiKey.isEmpty {
270+
// Send Authorization whenever a key exists; some localhost endpoints still require auth.
271+
if !config.apiKey.isEmpty {
272272
request.addValue("Bearer \(config.apiKey)", forHTTPHeaderField: "Authorization")
273273
}
274274

0 commit comments

Comments
 (0)