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

Missing gzip_type directive causes most resources to remain uncompressed #1

Open
s7m4b4 opened this issue Jan 29, 2021 · 1 comment

Comments

@s7m4b4
Copy link

s7m4b4 commented Jan 29, 2021

I noticed when deploying this at my org that a lot of files remain uncompressed. By default Nginx will only include filetype text/html (see here). By not defining any additional types, most of the big resource files will remain uncompressed (JS/CSS).

Atlassian advised me that the following are the resource types Jira will natively compress if enabled (which I've replicated in Nginx) -
gzip_types text/xml text/plain text/javascript text/css application/javascript application/x-javascript application/xml application/xhtml application/xhtml+xml application/json;

Below is a comparison for a batch.js load on a board (not a vanilla Jira instance so don't mind the bloated filesize).
The comparison was made using curl with the Accept-Encoding on/off.
e.g.
curl -kso /dev/null JIRA_URL/batch.js
curl -kso /dev/null -H "Accept-Encoding: gzip" JIRA_URL/batch.js

gzip_types disabled -
Uncompressed size : 11.05 MiB
Compressed size : 11.05 MiB

gzip_types enabled -
Uncompressed size : 11.05 MiB
Compressed size : 3.34 MiB

Happy to make a PR if this is correct.
** Disclaimer - I'm not a Nginx expert, and may be wrong in my assertions/testing 😄 .

@Bonn93
Copy link
Owner

Bonn93 commented Feb 12, 2021

Makes sense, feel free to make a PR for others to reference. :)

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

No branches or pull requests

2 participants