3
0
Fork 0
forked from mirrors/nixpkgs

nixos/nginx: serve unknown MIME-Types as binary

The built-in default for unknown MIME-Types is `text/plain` whereas the
upstream default config changes it to `application/octet-stream`. By
changing the default tpye, unknown files will be downloaded by browsers
instead of being displayed.
This commit is contained in:
Dustin Frisch 2021-01-30 12:52:02 +01:00
parent 1d8c7f5499
commit 891d1aa885
No known key found for this signature in database
GPG key ID: B4C3BF012D9B26BE

View file

@ -79,6 +79,8 @@ let
include ${pkgs.mailcap}/etc/nginx/mime.types;
include ${cfg.package}/conf/fastcgi.conf;
include ${cfg.package}/conf/uwsgi_params;
default_type application/octet-stream;
'';
configFile = pkgs.writers.writeNginxConfig "nginx.conf" ''