xbrowsersync/api

status.online = true ignored

mistergibson opened this issue · 6 comments

I have status.online = true in config/settings.json but when I when I go to the status page it reads offline. Is there a setting elsewhere I'm missing?

If not: I think I found a bug.

I did a fresh git clone from this repo on 2020.01.12 at 8pm PST

It built, it passed all its tests, and it serves up the home page fine. But I cannot figure out HOW to get the service in an ONLINE status. Any clues would be appreciated.

Thanks

Can you post the the result of /info and your settings.json please?

https://mysite/xbrowsersync/info: {"code":"NotImplementedException","message":"The requested route has not been implemented"}

{
"allowedOrigins": [],
"dailyNewSyncsLimit": 3,
"db": {
"authSource": "admin",
"connTimeout": 30000,
"host": "127.0.0.1",
"name": "xbrowsersync",
"useSRV" : false,
"username": "www-data",
"password": "www",
"port": 27017
},
"log": {
"file": {
"enabled": true,
"level": "info",
"path": "/var/log/xBrowserSync/api.log",
"rotatedFilesToKeep": 5,
"rotationPeriod": "1d"
},
"stdout": {
"enabled": true,
"level": "info"
}
},
"maxSyncs": 5242,
"maxSyncSize": 512000,
"server": {
"behindProxy": true,
"host": "127.0.0.1",
"https": {
"certPath": "",
"enabled": false,
"keyPath": ""
},
"port": 8080
},
"status": {
"allowNewSyncs": true,
"message": ".",
"online": true
},
"tests": {
"db": "xbrowsersynctest",
"port": 8081
},
"throttle": {
"maxRequests": 1000,
"timeWindow": 300000
}
}

Thanks, will do some testing and get back to you.

The issue is occurring because you're attempting to run the service on a relative path other than /. I've now added support for using relative paths, to resolve the above you'll need to add server.relativePath to your settings.json with a value of /xbrowsersync/.

Works like a charm now -- thanks so much for making this change :)

No worries @mistergibson, FYI I'll be releasing v1.1.11 shortly once I've updated the docker assets.