Skip to content

Commit

Permalink
maybe fix nextcloud?
Browse files Browse the repository at this point in the history
  • Loading branch information
drizuid authored Jan 3, 2024
1 parent 883ffed commit 8cff1cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 3 additions & 8 deletions root/defaults/nginx/site-confs/default.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ server {
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;

# default nginx mime.types
include mime.types;

# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
Expand Down Expand Up @@ -143,14 +146,6 @@ server {
default_type application/wasm;
}

location ~ \.js$ {
default_type text/javascript;
}

location ~ \.mjs$ {
default_type text/javascript;
}

}

location ~ \.woff2?$ {
Expand Down
5 changes: 5 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-nextcloud-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,8 @@ if [ ! -s /config/www/nextcloud/config/config.php ]; then
elif [ -f /config/www/nextcloud/config/config.php ]; then
sed -i "s|/app/www/public/data|/data|g" /config/www/nextcloud/config/config.php
fi

#modify javascript mime type and add .mjs support
if [ ! -s /etc/nginx/mime.types ]; then
sed -i "|application/javascript js;|text/javascript js mjs;|g" /etc/nginx/mime.types
fi

0 comments on commit 8cff1cf

Please sign in to comment.