Skip to content

Commit 6728358

Browse files
gjtorikianclaude
andauthored
fix: set canonical User-Agent header format (#476)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a66c15b commit 6728358

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/workos/base_client.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ class BaseClient
3434
RETRY_BACKOFF_BASE = 0.5
3535
LOG_SEVERITY = {debug: 0, info: 1, warn: 2, error: 3, unknown: 4}.freeze
3636

37-
USER_AGENT = "workos-ruby/#{WorkOS::VERSION} ruby/#{RUBY_VERSION} (#{RUBY_PLATFORM})"
37+
USER_AGENT = [
38+
"WorkOS",
39+
"#{defined?(::RUBY_ENGINE) ? ::RUBY_ENGINE : "ruby"}/#{RUBY_VERSION}",
40+
RUBY_PLATFORM,
41+
"v#{WorkOS::VERSION}"
42+
].join("; ").freeze
3843

3944
attr_reader :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level
4045

0 commit comments

Comments
 (0)