Javascript has "Content-Encoding: gzip" even when request has "Accept-Encoding: identity" header

I need to substitute for in wspr.js in my Nginx reverse proxy. To do this I am using the Nginx sub_filter command.

The sub_filter works for HTML and CSS files from Kiwi but does not work for Javascript because the Content-Encoding is gzip and needs to be plain text for the text substitution to work.

curl -I -H "Accept-Encoding: identity" ""
HTTP/1.1 200 OK
Date: Tue, 23 Apr 2024 13:20:49 GMT
Last-Modified: Tue, 16 Apr 2024 03:38:46 GMT
Etag: "661df2c6.10153"
Content-Type: application/javascript
Content-Length: 10153
Connection: keep-alive
Accept-Ranges: bytes
Cache-Control: max-age=0, must-revalidate
Content-Encoding: gzip
Server: KiwiSDR_Mongoose/1.671
Transfer-Encoding: chunked

The Nginx config looks like this.

 sub_filter '' '';
 sub_filter_once off;
 sub_filter_last_modified on;
 sub_filter_types *;

Is it possible for the Kiwi web server to honour the Accept-Encoding header?


  • The Kiwi web server does not support serving uncompressed js content. The files are only stored minimized, concatenated and gzipped to save space since they are served directly out of main memory to meet the realtime requirements of the server (i.e. not break the audio streaming).

    Until very recently the css files were done the same way. But for some reason browsers stopped uncompressing them properly (for reasons I don't understand) and I had to revert to uncompressed files with the associated performance/space hit.

    So maybe the answer for this problem is to change the WSPR extension to using curl as mentioned in the other thread and then use the -L option to allow connection upgrades from http to https. Not 100% sure that would work..

  • So v1.674 now uses a curl -L to upload spots with the WSPR extension (same as WSPR autorun does).

    I'd be interested to know if this solves your Nginx https redirect problem.

  • Indeed it does!

    Looks like my Kiwi upgraded to v1.674 last night and now it is uploading spots even when not in autorun.

    Many thanks!

  • Okay, good news.

Sign In or Register to comment.