]> git.sesse.net Git - remoteglot/commitdiff
Tiny simplification in serve-analysis.js.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 12 Jul 2023 10:16:41 +0000 (12:16 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 12 Jul 2023 10:16:41 +0000 (12:16 +0200)
server/serve-analysis.js

index 2e176cc9b211a89410dcdcc96af9da5941269dc7..4c9a24e9a2abf922e59a273c425a9f5cb3d32337 100644 (file)
@@ -374,12 +374,7 @@ server.on('request', function(request, response) {
        mark_recently_seen(unique);
 
        var accept_encoding = request.headers['accept-encoding'];
-       var accept_gzip;
-       if (accept_encoding !== undefined && accept_encoding.match(/\bgzip\b/)) {
-               accept_gzip = true;
-       } else {
-               accept_gzip = false;
-       }
+       let accept_gzip = (accept_encoding !== undefined && accept_encoding.match(/\bgzip\b/));
 
        // If we already have something newer than what the user has,
        // just send it out and be done with it.