8000 Added tower-http compression as middleware on both HTTP routers by alexohneander · Pull Request #386 · torrust/torrust-tracker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added tower-http compression as middleware on both HTTP routers #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 26, 2023
Merged

Added tower-http compression as middleware on both HTTP routers #386

merged 2 commits into from
Aug 26, 2023

Conversation

alexohneander
Copy link
Contributor

Modified:
I have added tower-http compression as middleware on both HTTP routers(API, Tracker HTTP).

All tests were run and were okay.

@josecelano josecelano linked an issue Aug 26, 2023 that may be closed by this pull request
@codecov
Copy link
codecov bot commented Aug 26, 2023

Codecov Report

Merging #386 (22bb98a) into develop (d36d655) will increase coverage by 0.12%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #386      +/-   ##
===========================================
+ Coverage    83.95%   84.07%   +0.12%     
===========================================
  Files          102      102              
  Lines         7267     7185      -82     
===========================================
- Hits          6101     6041      -60     
+ Misses        1166     1144      -22     
Files Changed Coverage Δ
src/servers/apis/routes.rs 100.00% <100.00%> (ø)
src/servers/http/v1/routes.rs 100.00% <100.00%> (ø)

... and 34 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@josecelano josecelano requested a review from da2ce7 August 26, 2023 21:04
Copy link
Contributor
@da2ce7 da2ce7 left a comment

Choose a reason for hiding this comment

The reason will be d 8000 isplayed to describe this comment to others. Learn more.

Looks good to me. Surprisingly Simple!

@josecelano
Copy link
Member

I've tested manually with the following:

curl -I 'http://127.0.0.1:1212/api/v1/stats?token=MyAccessToken'   -H 'Cache-Control: no-cache'   -H 'Pragma: no-cache'   -H 'Accept-Encoding: gzip'
curl -raw 'http://127.0.0.1:1212/api/v1/stats?token=MyAccessToken'   -H 'Cache-Control: no-cache'   -H 'Pragma: no-cache'   -H 'Accept-Encoding: gzip' --output response.gz
gzip -d response.gz 

@josecelano
Copy link
Member
josecelano commented Aug 26, 2023

ACK 22bb98a

@josecelano josecelano merged commit 8b48b0c into torrust:develop Aug 26, 2023
@alexohneander
Copy link
Contributor Author

@josecelano It is also supported brotli

curl -I 'http://127.0.0.1:1212/api/v1/stats?token=MyAccessToken'   -H 'Cache-Control: no-cache'   -H 'Pragma: no-cache'   -H 'Accept-Encoding: br'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add middleware to compress responses
3 participants
0