'Return the current server URL, e.g. \'http://localhost:33411/\''

def server_url(self):

    try:
        surl = ('%s://%s' % (self.headers.get('x-forwarded-proto', 'http'), self.headers.get('host', 'localhost')))
        self.server.server_url = surl
    except AttributeError:
        surl = self.server.server_url
    return surl
