time-sync server doesn't seem to work Meteor ROOT_URL configuration
Hello:
I have found that the time-sync server '/_timesync' route doesn't work (route not executed) when the Meteor ROOT_URL environment or configuration variable is specified. As a result, I quickly played around with the handler using __meteor_runtime_config__.ROOT_URL_PATH_PREFIX and that seemed to do the trick. Thus, the handler looked something like this:
const pathPrefix = __meteor_runtime_config__.ROOT_URL_PATH_PREFIX || "";
WebApp.rawConnectHandlers.use(pathPrefix + "/_timesync", function (req, res, next) {
// Existing code
});
Since I am not using Cordova or anything like that, I didn't account for all the various server configurations (assuming it is required).
Is this something that can be fixed and released soon such that it will work with the user-status package?
Please let me know.
What version of timesync are you running?
I just played around with the latest version 0.5.1.
Also, please note that I am having to support Meteor version 1.4.3.2 right now. I don't think this makes a difference in this case. Hopefully I can change that soon :-)
Question please:
If I am using this with the user-status package, what is the worst case scenario with an non-function time sync handler outside of the following issues:
- User login timestamp information not synchronized across all browsers.
- A bogus API call which returns the entire Meteor application contents instead of a timestamp. Basically, I am wanting to know if you can think of anything really bad or catastrophic please.
Would you please consider the code snippet I previously provided (or something similar) and create a release soon?
Fix released in v0.5.3