Skip to content
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

HTTP compression for static assets #542

Closed
ledor473 opened this issue Nov 16, 2017 · 3 comments · Fixed by #545
Closed

HTTP compression for static assets #542

ledor473 opened this issue Nov 16, 2017 · 3 comments · Fixed by #545

Comments

@ledor473
Copy link
Member

It seems that the files served by the /static route are not compressed.

The jaeger-ui files seems to be properly minified but they are still quite heavy:
/static/css/main.*.css --> ~600KB
/static/js/main.*.js --> ~1.8MB

@yurishkuro
Copy link
Member

That's a great suggestion. Off top of my head I don't remember if Go's file server supports it.

@ledor473
Copy link
Member Author

It seems that mux/handlers provides one and it's already part of the dependancies:
https://github.com/gorilla/handlers

We could probably wrap the whole mux.NewRouter() with the CompressHandler just like it's done by the RecoveryHandler.

I can send a pull request with that

@yurishkuro
Copy link
Member

pull request will be most welcome

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

Successfully merging a pull request may close this issue.

2 participants