Unable to disable brotli/gzip compression

Description

I am hosting a customer ecommerce website (Medusa JS) with nodeJS through passenger (and also tried through regular proxypass in .htaccess).
When accessing the site, the browser load some .js assets and they are compressed, so the browser is throwing error when reading the script file.

Uncaught SyntaxError: Invalid or unexpected token (at script.js:1:1)

I tried to disable brotli and gzip completly for this site but it is not working.

I tried those variant in .htaccess and also in the /etc/httpd/conf/siteX{.ssl}/custom

# Try 1
SetEnv no-brotli 1
SetEnv no-gzip 1

# Try 2
RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]

# Try 3
<IfModule brotli_module>
  SetEnv no-brotli
</IfModule>

I am seeing there is a compression option in medusa (6.3. Medusa Application Configuration - Medusa Documentation)
But this is set to false.

I understand that it might not be a problem with APISCP configuration but I just wanted to make sure.
Basically I would like to know if I am missing something about disabling compression on the httpd side.

Environment

ApisCP version: cpcmd misc:cp-version

[root@dash-mini ~]# cpcmd misc:cp-version
revision: a167cef15535ffcb8837e6b9a291699ec113b7c0
timestamp: 1775061482
ver_maj: 3
ver_min: 2
ver_patch: 0
ver_pre: a167cef15-dirty
dirty: true
debug: false

Operating System: uname -r

6.12.0-55.40.1.el10_0.x86_64

Thank you for your help.

no-brotli has the same effect as no-gzip per source.

Per Apache documentation:

There is an environment variable no-brotli , set via SetEnv , which will disable brotli compression for a particular request, even if it is supported by the client.

So that should work OK. I’d check that Pagespeed isn’t interfering with the request:

<IfModule pagespeed_module>
    ModPagespeed off
</IfModule>

Hello,

Thank you for your quick response as always !
I will try some more configuration as you stated.

Also, I noticed a cache on the apache/httpd side.
For example, when I proxy pass all requests to my node app, if I shutdown the node app that is serving all my assets, I can still request some assets. But my node app is down, so there must be a cache with apache. I could not find information on the APISCP documentation about it.

I tried to disable all cache (TBH probably in the wrong way) but I cannot make this work…
How can I disable cache in the .htaccess or in the /etc/httpd/conf/siteX/custom ?

Again, thank you for you time and support,
have a great weekend.

Browser also has a cache. This is most likely what you’re seeing.