Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7415da3

Browse files
committed
fix: Emit Clerk-API-Version header in all requests
1 parent a7fb91d commit 7415da3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/clerk/sdk.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
module Clerk
77
class SDK < ClerkHttpClient::SDK
8-
# TODO: Move to constants?
98
DEFAULT_HEADERS = {
109
"User-Agent": "Clerk/#{Clerk::VERSION}; Faraday/#{Faraday::VERSION}; Ruby/#{RUBY_VERSION}",
11-
"X-Clerk-SDK": "ruby/#{Clerk::VERSION}" # TODO: Add framework identifier
10+
"X-Clerk-SDK": "ruby/#{Clerk::VERSION}",
11+
"Clerk-API-Version": "2025-04-10",
1212
}
1313

1414
# How often (in seconds) should JWKs be refreshed
15-
JWKS_CACHE_LIFETIME = 3600 # 1 hour / TODO: Move to constants?
15+
JWKS_CACHE_LIFETIME = 3600 # 1 hour
1616

1717
@@jwks_cache = JWKSCache.new(JWKS_CACHE_LIFETIME)
1818

0 commit comments

Comments
 (0)