philnash / pwned

😱 An easy, Ruby way to use the Pwned Passwords API.
https://rubygems.org/gems/pwned/
MIT License
426 stars 22 forks source link

Support gzip/brotli compressed responses #16

Open philnash opened 4 years ago

philnash commented 4 years ago

The PwnedPasswords API will return gzipped or brotli encoded content if asked for it.

Currently the library will accept any headers passed through. If a user were to pass headers: { "Accept-Encoding" => "br" } the library would faithfully request the encoded response and then fail to do anything with it.

Thoughts: