Skip to content

Commit abffe47

Browse files
authored
feat: Enable gzip compression on polling requests (#249)
1 parent b639f43 commit abffe47

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

contract-tests/service.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
'migrations',
3737
'event-sampling',
3838
'context-comparison',
39+
'polling-gzip',
3940
],
4041
}.to_json
4142
end

lib/ldclient-rb/requestor.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def initialize(sdk_key, config)
2626
@sdk_key = sdk_key
2727
@config = config
2828
@http_client = LaunchDarkly::Util.new_http_client(config.base_uri, config)
29+
.use(:auto_inflate)
30+
.headers("Accept-Encoding" => "gzip")
2931
@cache = @config.cache_store
3032
end
3133

0 commit comments

Comments
 (0)