mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Internalization improvements.
This commit is contained in:
parent
908b308c30
commit
db2577b897
9 changed files with 1621 additions and 1444 deletions
12
webserver.js
12
webserver.js
|
@ -2087,6 +2087,16 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
}
|
||||
}
|
||||
|
||||
// Server the player page
|
||||
function handlePlayerRequest(req, res) {
|
||||
const domain = checkUserIpAddress(req, res);
|
||||
if ((domain == null) || (domain.redirects == null)) { res.sendStatus(404); return; }
|
||||
|
||||
parent.debug('web', 'handlePlayerRequest: sending player');
|
||||
res.set({ 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0' });
|
||||
render(req, res, getRenderPage('player', req), getRenderArgs({}, domain));
|
||||
}
|
||||
|
||||
// Handle domain redirection
|
||||
obj.handleDomainRedirect = function (req, res) {
|
||||
const domain = checkUserIpAddress(req, res);
|
||||
|
@ -3525,6 +3535,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
obj.app.get(url + 'logo.png', handleLogoRequest);
|
||||
obj.app.post(url + 'translations', handleTranslationsRequest);
|
||||
obj.app.get(url + 'welcome.jpg', handleWelcomeImageRequest);
|
||||
obj.app.get(url + 'player.htm', handlePlayerRequest);
|
||||
obj.app.get(url + 'player', handlePlayerRequest);
|
||||
obj.app.ws(url + 'amtactivate', handleAmtActivateWebSocket);
|
||||
if (parent.pluginHandler != null) {
|
||||
obj.app.get(url + 'pluginadmin.ashx', obj.handlePluginAdminReq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue