@Simon Lovejoy Thanks for asking question! If I am understanding right you want to enable compression on the app service and not on AFD, If so,
You may refer to below blog links for the detailed steps and would be helpful-
Optimizing Azure Web App: Enabling Dynamic GZIP Compression
Compression on App Service Linux
Let us know.