Skip to content

Commit

Permalink
Prepend user-supplied user-agent (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipleblanc authored Dec 17, 2024
1 parent 46a25f9 commit 5207fb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/ai/spice/SpiceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public SpiceClient(String appId, String apiKey, URI flightAddress, URI httpAddre
if (Strings.isNullOrEmpty(userAgent)) {
uaString = Config.getUserAgent();
} else {
uaString = userAgent;
// Prepend the user-supplied user agent string with the Spice.ai user agent
uaString = userAgent + " " + Config.getUserAgent();
}
headers.put("User-Agent", uaString);

Expand Down

0 comments on commit 5207fb7

Please sign in to comment.