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

API: Enable gzip compression #13164

Merged
merged 2 commits into from Mar 18, 2024
Merged

Conversation

gabrielmougard
Copy link
Contributor

@gabrielmougard gabrielmougard commented Mar 15, 2024

And add security response headers to documentation endpoint.

Fixes #13150

lxd/documentation.go Outdated Show resolved Hide resolved
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
@tomponline tomponline changed the title doc: serve compressed documentation assets and metadata API: Enable gzip compression Mar 18, 2024
@tomponline tomponline merged commit 4ff6965 into canonical:main Mar 18, 2024
28 checks passed
@tomponline
Copy link
Member

@edlerd this should be in latest/edge now please can you check the UI is working OK with it?

Thanks

@edlerd
Copy link
Contributor

edlerd commented Mar 19, 2024

@edlerd this should be in latest/edge now please can you check the UI is working OK with it?

Tested just now, and it works nicely, I can see the gzip being used on any API response. It drastically reduces network size, i.e. for 1.0/metadata/configuration from 144kb to 20kb.

I see an issue with instance start, but that seems to be unrelated, will contact you on another way with details on it.

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 this pull request may close these issues.

Add gzip and security header for documentation and API endpoints
4 participants