def in_public_domain(request):
    """This method validates if oTree are published on a public domain
    because mturk need it

    """
    host = request.get_host().lower()
    if ':' in host:
        host = host.split(':', 1)[0]
    if host in ['localhost', '127.0.0.1']:
        return False
    return True
