Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maybe fix nextcloud? #405

Merged
merged 6 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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