Procházet zdrojové kódy

[fix] use currentsite.txt only if host is localhost

version-14
Rushabh Mehta před 8 roky
rodič
revize
e2649975d2
1 změnil soubory, kde provedl 6 přidání a 4 odebrání
  1. +6
    -4
      socketio.js

+ 6
- 4
socketio.js Zobrazit soubor

@@ -171,12 +171,14 @@ function get_task_room(socket, task_id) {
}

function get_site_name(socket) {
if (conf.default_site) {
return conf.default_site;
}
else if (socket.request.headers['x-frappe-site-name']) {
if (socket.request.headers['x-frappe-site-name']) {
return get_hostname(socket.request.headers['x-frappe-site-name']);
}
else if (['localhost', '127.0.0.1'].indexOf(socket.request.headers.host) !== -1
&& conf.default_site) {
// from currentsite.txt since host is localhost
return conf.default_site;
}
else if (socket.request.headers.origin) {
return get_hostname(socket.request.headers.origin);
}


Načítá se…
Zrušit
Uložit