⚠️ This issue respects the following points: ⚠️
Bug description
Using the configuration suggested in https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/mariadb, with the addition of an overwritewebroot (so that my nextcloud appears at https://redacted.com/nextcloud) the SetupChecks for mjs (new in Nextcloud 7 Hub 28.0.2) configuration fails as in #42989 even with the fix provided by #42999.
Debug log entry (redacting server name):
cURL error 28: Failed to connect to redacted.com port 443 after 10002 ms: Timeout was reached (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://redacted.com/nextcloud/apps/settings/js/esm-test.mjs
Steps to reproduce
- Deploy the above setup from nextcloud/docker
- In the app environment, set:
NEXTCLOUD_TRUSTED_DOMAINS=redacted.com
NEXTCLOUD_TRUSTED_PROXIES=172.16.0.0/12
OVERWRITEWEBROOT=/nextcloud
- In the web environment set:
VIRTUAL_HOST=redacted.com
VIRTUAL_PATH=/nextcloud/
VIRTUAL_DEST=/
Expected behavior
The server is properly configured, so I'd expect the MJS warning to not appear.
Installation method
Community Docker image
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
The new warning message, while well-intentioned, is guaranteed to be fragile, since it attempts to determine from inside the php app host what the content-type that the end-user browser sees, and in the face of "client browser to proxy to web server to fpm" transformations (which is the docker configuration in the example) and server configuration flexibility (e.g. overwritereboot), that is simply impossible to guarantee if executed from inside the php app.
Another, perhaps more robust, approach could call /settings/ajax/checksetup with a block of data that assesses what the client sees (for example, {"client-observed-mjs-content-type":"application/javascript", etc.}, which the checksetup script could reflect back as warnings where the client-side observation(s) are incorrect.
Bug description
Using the configuration suggested in https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/mariadb, with the addition of an overwritewebroot (so that my nextcloud appears at https://redacted.com/nextcloud) the SetupChecks for mjs (new in Nextcloud 7 Hub 28.0.2) configuration fails as in #42989 even with the fix provided by #42999.
Debug log entry (redacting server name):
Steps to reproduce
Expected behavior
The server is properly configured, so I'd expect the MJS warning to not appear.
Installation method
Community Docker image
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
The new warning message, while well-intentioned, is guaranteed to be fragile, since it attempts to determine from inside the php app host what the content-type that the end-user browser sees, and in the face of "client browser to proxy to web server to fpm" transformations (which is the docker configuration in the example) and server configuration flexibility (e.g. overwritereboot), that is simply impossible to guarantee if executed from inside the php app.
Another, perhaps more robust, approach could call /settings/ajax/checksetup with a block of data that assesses what the client sees (for example,
{"client-observed-mjs-content-type":"application/javascript", etc.}, which the checksetup script could reflect back as warnings where the client-side observation(s) are incorrect.