Compression not happening on reverse proxy php-fpm

I think that the issue is with curl. I didn’t realise that there is a difference with using -I.

Now I can see data is encoded.

# curl -vL --compressed "https://wiki.tnonline.net/w/Btrfs/Mount_Options" > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host wiki.tnonline.net:443 was resolved.
* IPv6: 2001:470:28:704::100
* IPv4: 155.4.110.241
*   Trying [2001:470:28:704::100]:443...
* Connected to wiki.tnonline.net (2001:470:28:704::100) port 443
* found 146 certificates in /etc/ssl/certs/ca-certificates.crt
* GnuTLS ciphers: NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509:-VERS-SSL3.0
* ALPN: curl offers h2,http/1.1
* SSL connection using TLS1.3 / ECDHE_RSA_AES_128_GCM_SHA256
*   server certificate verification OK
*   server certificate status verification SKIPPED
*   common name: wiki.tnonline.net (matched)
*   server certificate expiration date OK
*   server certificate activation date OK
*   certificate public key: EC/ECDSA
*   certificate version: #3
*   subject: CN=wiki.tnonline.net
*   start date: Mon, 05 Feb 2024 02:17:54 GMT
*   expire date: Sun, 05 May 2024 02:17:53 GMT
*   issuer: C=US,O=Let's Encrypt,CN=E1
* ALPN: server accepted h2
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://wiki.tnonline.net/w/Btrfs/Mount_Options
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: wiki.tnonline.net]
* [HTTP/2] [1] [:path: /w/Btrfs/Mount_Options]
* [HTTP/2] [1] [user-agent: curl/8.5.0]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [accept-encoding: deflate, gzip, br, zstd]
> GET /w/Btrfs/Mount_Options HTTP/2
> Host: wiki.tnonline.net
> User-Agent: curl/8.5.0
> Accept: */*
> Accept-Encoding: deflate, gzip, br, zstd
>
< HTTP/2 200
< alt-svc: h3=":443"; ma=2592000
< cache-control: private, must-revalidate, max-age=0
< content-encoding: zstd
< content-language: en-GB
< content-type: text/html; charset=UTF-8
< expires: Thu, 01 Jan 1970 00:00:00 GMT
< last-modified: Sat, 10 Feb 2024 21:54:54 GMT
< server: Caddy
< strict-transport-security: max-age=31968000;  preload
< vary: Accept-Encoding, Cookie
< vary: Accept-Encoding
< x-content-type-options: nosniff
< x-frame-options: DENY
< x-request-id: 6487061a6a59dff0210a9e99
< date: Sat, 10 Feb 2024 23:58:33 GMT
<
{ [13452 bytes data]
100 13452    0 13452    0     0   232k      0 --:--:-- --:--:-- --:--:--  234k
* Connection #0 to host wiki.tnonline.net left intact
2 Likes