MeshCentral
MeshCentral copied to clipboard
webrelay fails to relay scripts with no mime type
Describe the bug was hoping to try the webrelay feature to connect to our "urbackup" server through meshcentral, urbackup web interface runs on port 55415, the page starts to load, but the login form never appears, looking in devtools its failing to load a number of scripts and CSS due to "because its MIME type ('') is not executable, and strict MIME type checking is enabled." If load the site directly locally the same error doesn't occur.
To Reproduce Steps to reproduce the behavior: 1.Login to mesh central, 2. open dev tools 3. open device, right click set the http port to 55415 4.connect to web relay
Expected behavior Would be nice if the page loaded, so could check on the backup status through meshcentral.
Screenshots
If applicable, add screenshots to help explain your problem.
Server Software (please complete the following information):
- OS: [e.g. Ubuntu] UBUNTU 20.04
- Virtualization: [e.g. Docker] Droplet on digital ocean
- Network: [e.g. LAN/WAN, reverse proxy, cloudflare, ssl offload, etc...] LAN
- Version: [e.g. 1.0.43] 1.0.76
- Node: [e.g. 18.4.0] v16.17.0
Client Device (please complete the following information):
- Device: [e.g. Laptop] HP Laptop
- OS: [e.g. Ubuntu] Windows 10
- Network: [e.g. Local to Meshcentral, Remote over WAN] connected via a vpn
- Browser: [e.g. Google Chrome] Google Chrome
- MeshCentralRouter Version: [if applicable]
Remote Device (please complete the following information):
- Device: [e.g. Laptop] server
- OS: [e.g. Windows 10 21H2] Ubuntu 20.04
- Network: [e.g. Local to Meshcentral, Remote over WAN] LAN
- Current Core Version (if known): Current Core: Aug 29 2022, 294730201
Additional context Add any other context about the problem here.
Your config.json file
{
"$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json",
"settings": {
"_cert": "myserver.mydomain.com",
"MongoDb": "mongodb://127.0.0.1:27017/meshcentral",
"port": 443,
"RelayPort": 453,
"redirPort": 80,
},
"domains": {
"": {
"userallowedip" : "",
"minify": true,
"newAccounts": false,
"userNameIsEmail": true,
"novnc": false,
"consentMessages": {
"consentTimeout": 30,
"autoAcceptOnTimeout": true
}
}
},
"_letsencrypt": {
"__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
"email": "[email protected]",
"names": "myserver.mydomain.com",
"production": false
}
}
I have just discovered a similar issue with our portainer relay
After the update to 1.0.76 it doesn't seem to load the font awesome icons anymore?
Just for info my issue was happening prior to 1.0.76, just hadn't got round to log it, and when I noticed the commit said multiple fixes for web relay I thought I would see if that was one of them.
Just for info my issue was happening prior to 1.0.76, just hadn't got round to log it, and when I noticed the commit said multiple fixes for web relay I thought I would see if that was one of them.
its ok my issue is due to the change in security policy, juct checked the web console, will log it seperately
Reverted 'Content-Security-Policy', will be in v1.0.77.
not sure if we was expecting to resolve my issue or not, but just thought to confirm v1.0.77 didn't improve my use case.
I know its probably the applications fault for not sending the correct mime type on these scripts etc. i'll see there is anything i can do to fix it that side.
not sure if we was expecting to resolve my issue or not, but just thought to confirm v1.0.77 didn't improve my use case.
I know its probably the applications fault for not sending the correct mime type on these scripts etc. i'll see there is anything i can do to fix it that side.
I'll try creating a setup soon and see if I can replicate the issue, Urbackup what version and os?
running UrBackup 2.5.25, on Ubuntu 20.04.5 LTS
i confirm im seeing the same issue here, ive never seen this type of error before in my years of being a web developer? the only thing i can think is the web relay isnt relaying over the mime type of the resource that gets returned (if its been set from the server in the first place)
Any of these applicable? https://stackoverflow.com/questions/48248832/stylesheet-not-loaded-because-of-mime-type https://github.com/froala/angular-froala/issues/170#issuecomment-386117678