internetarchive / iaux-search-service

GNU Affero General Public License v3.0
4 stars 2 forks source link

WEBDEV-6051 Limit length of `client_url` param and omit it entirely for very long queries #35

Closed latonv closed 1 year ago

latonv commented 1 year ago

This PR truncates the client_url param if it is longer than 400 characters (which should be more than enough for most debugging purposes), and omits the client_url param entirely if the query length exceeds 1000 characters. This is to allow more space within the URL length limit for long queries or requests with many filters.

github-actions[bot] commented 1 year ago

PR Preview Action 79a1887f03d1f4160a4c088e5139725bece67080 :---: Preview removed because the pull request was closed. 2023-05-04 23:30 UTC

codecov[bot] commented 1 year ago

Codecov Report

Merging #35 (f4b392d) into main (cd08ad9) will increase coverage by 4.94%. The diff coverage is 100.00%.

:exclamation: Current head f4b392d differs from pull request most recent head 8759720. Consider uploading reports for the commit 8759720 to get more accurate results

@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   87.15%   92.10%   +4.94%     
==========================================
  Files          26       26              
  Lines        2522     2532      +10     
  Branches      124      224     +100     
==========================================
+ Hits         2198     2332     +134     
+ Misses        313      189     -124     
  Partials       11       11              
Impacted Files Coverage Δ
src/search-param-url-generator.ts 100.00% <100.00%> (ø)
src/search-params.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes