hoellen / docker-nextcloud

All-in-one Nextcloud Docker image. Alpine-based, rootless and simple.
31 stars 5 forks source link

Missing .mjs as a file extension for javascript messing up with certain apps #60

Closed mlatorre31 closed 10 months ago

mlatorre31 commented 10 months ago

Logreader needs .mjs file extension in order to properly work (blank screen when accessing the logs from settings) Based on upstream docs for Ngnix:

[...]
    # Add .mjs as a file extension for javascript
    # Either include it in the default mime.types list
    # or include you can include that list explicitly and add the file extension
    # only for Nextcloud like below:
    include mime.types;
    types {
        text/javascript mjs;
    }
[...]
[...]
    # Serve static files
    location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ {
[...]

I guess other apps would required it. Tested on a 28.0.1 install. Not tested in previous versions.

waja commented 10 months ago

Maybe a look into https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-subdir.conf.sample#L47-L49 and https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-subdir.conf.sample#L166-L174 could help. I think there should be a couple of other file extentions reviewed.

waja commented 10 months ago

Tested on a 28.0.1 install. Not tested in previous versions.

@mlatorre31 can you please explain a bit more what you tested?

hoellen commented 10 months ago

I have updated the mime type for .mjs. The logreader module is now loaded correctly.

mlatorre31 commented 10 months ago

Tested on a 28.0.1 install. Not tested in previous versions.

@mlatorre31 can you please explain a bit more what you tested?

I meant, I changed the line I mentioned and restarted the 28.0.1 but did not checked if this impact earlier version (<28).