Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow overriding of the detectec IP address

  • Loading branch information...
commit c1ef1a2b0985d3f5de5c39026be02b6c4510c892 1 parent 9e410da
@rosarior rosarior authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 apps/server_talk/views.py
View
5 apps/server_talk/views.py
@@ -1,6 +1,5 @@
"""The root view for OpenRelay API"""
import logging
-import socket
import hashlib
from django.utils.translation import ugettext_lazy as _
@@ -21,7 +20,7 @@
from server_talk.models import LocalNode, Sibling, NetworkResourceVersion
from server_talk.forms import JoinForm
from server_talk.api import RemoteCall
-from server_talk.conf.settings import PORT
+from server_talk.conf.settings import PORT, IPADDRESS
from server_talk.exceptions import AnnounceClientError
from server_talk.utils import CPUsage
@@ -169,7 +168,7 @@ def post(self, request):
sibling.save()
local_node = LocalNode.get()
local_node_info = {
- 'ip_address': socket.gethostbyname(socket.gethostname()),
+ 'ip_address': IPADDRESS,
'port': PORT,
'uuid': local_node.uuid,
'name': local_node.name,

0 comments on commit c1ef1a2

Please sign in to comment.
Something went wrong with that request. Please try again.