Code solutions that add Content-Encoding: gzip to Response Headers seem to work locally but not on the Azure slot.
I have SSHed onto the container and the nginx.config gzip setting is commented out! It is set by default for Windows slots, but commented out by MS for Linux ones.
Normally I would just edit the nginx.config – but how do I make the changes persistent over a slot restart? Changes done to the nginx.config via SSH on the slot instance itself are NOT persisted on slot restart
Modifying nginx.conf for Azure App Linux Service suggests it CANNOT be done.
I can’t see how to do that with the Azure Web App setting – there seem no settings on the slot in the Azure UI.
Does anyone know how to do this? Or that it definitely CANNOT be done by any means?
NOTE: This is NOT an nginx config question but an Azure Linux slot specific one!
2
Answers
Gave up on this line of thought and since it was a static website, put it on a CDN, problem solved.
Here is a Nginx server block that enables gzip for you: