diff --git a/services/nextcloud.nix b/services/nextcloud.nix index a19a50c..3026f25 100644 --- a/services/nextcloud.nix +++ b/services/nextcloud.nix @@ -147,10 +147,16 @@ in fastcgi_read_timeout 120s; ''; }; - "~ \\.(?:css|js|woff2?|svg|gif|map)$".extraConfig = '' + "~ \\.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$".extraConfig = '' try_files $uri /index.php$request_uri; expires 6M; access_log off; + location ~ \.mjs$ { + default_type text/javascript; + } + location ~ \.wasm$ { + default_type application/wasm; + } ''; "~ ^\\/(?:updater|ocs-provider)(?:$|\\/)".extraConfig = '' try_files $uri/ =404; @@ -160,6 +166,11 @@ in try_files $uri /index.php$request_uri; access_log off; ''; + "~ \.woff2?$".extraConfig = '' + try_files $uri /index.php$request_uri; + expires 7d; # Cache-Control policy borrowed from `.htaccess` + access_log off; # Optional: Don't log access to assets + ''; }; };