From: yomguy Date: Wed, 5 Dec 2012 11:10:15 +0000 (+0100) Subject: add ROUTER_IP to forward streams X-Git-Tag: 1.3-TC~62 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7b53cd90a287066dfef62cbc6e2ff05efe562a28;p=teleforma.git add ROUTER_IP to forward streams --- diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 62577044..70cc6c63 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -416,7 +416,15 @@ class ConferenceRecordView(FormView): context['mime_type'] = 'video/webm' status = Status() status.update() - context['host'] = status.ip + + request_host = get_host(self.request) + local_host = status.ip + if request_host.split('.')[0] == local_host.split('.')[0]: + ip = local_host + else: + ip = settings.ROUTER_IP + + context['host'] = ip context['hidden_fields'] = self.hidden_fields return context