Hi there,
Thanks for the detailed explanation—this is a good catch. Your suspicion is right: this issue isn’t caused by pfSense or HAProxy, but by the web server behind Nextcloud (likely Apache or Nginx) not serving .mjs files with the correct MIME type.
HAProxy simply acts as a reverse proxy and does not handle or modify MIME types. It forwards the request to your backend server (10.0.24.10:3334 in this case), which is responsible for serving static content like .mjs files. To fix it:
For Nginx, modify mime.types to include:
application/javascript js mjs;
For Apache, add:
AddType application/javascript .mjs
Once this change is in place, the viewer and other JS modules should load properly through HAProxy.
As a side note, if you're ever doing advanced tasks like proxy rotation for web scraping or external API access, that’s something HAProxy can help with—but it doesn’t apply here.
Let me know if you'd like help locating your web server config!