Previous implementation was quite naive and assumed a lot of non-guaranteed premises. Checking if our session is valid before doing each request is very stupid, but it was needed for multi-user sessions. Next, even if we checked that our session is valid (or revalidated it if needed), we then assumed it's valid for at least X seconds, which is once again entirely false. Moreover, on top of those two issues, refreshing our session could do absolutely nothing as there is no guarantee that once-refreshes session stays like that even for our very next request.
Get rid of all of this shit and rewrite it with proper mechanism. We're making a request, if that request results in redirection to session refresh, refresh session, then repeat the same request again. Add failsafes for infinite loops, make it enough thread-safe and optimized for concurrent usage.
This commit won't only improve previously half-valid implementation, but will also greatly optimize number of requests being sent, as we won't need to check our session before each request. The entire thing should work like that since beginning.
Good thing that somebody actually reads my commits, you can pat yourself on the back for being awesome 👍
Just in case you have no clue what the code actually does - no, it doesn't have any bitcoin miner inside. You owe me 1$ donation for explanation 😆
And if you know what it does - don't use it just yet, I'll document it once I deem it stable.
This makes it possible to not only listen on multiple different host/port combinations, but also different protocols or base URLs (even though this will probably break things up, need to do more tests)
* Add basic content for config changer
* Misc
* Change changelog link according to currently running version
* Misc
* Add font for log and command that is working on each OS
* Add game banners on detailed bot view
* Cleanup
* Added new font to log because I forgot in last commit
Prepare for new bot detailed overview
* Added slick-carousel for multiple games farming in bots detailed overview
* Added HumanizeDuration.js to bots page
* Change log and command font to monospace
Fixed bots detailed overview for multiple games, thanks felipe19930
* Added command history accessible via keyboard up & down arrows
* Add encodeURIComponent()
* Added saving/loading for entered commands
* Only save last 20 commands
* Misc
* Added auto clear checkbox for command
* Added "show only" drop down to bots page
* Fix for command history
* and another one
* save the last 20 commands instead of the last 5
* Add refresh button to bots page
* Upgraded font-awesome to latest version
Removed expert mode
Added checkbox for 'show delete button' on bots page
Removed show only farming
Bug fixes
* Misc
* updated based on other commits