diff --git a/panoptes_cli/commands/configure.py b/panoptes_cli/commands/configure.py index 51046d8..e2fd6df 100644 --- a/panoptes_cli/commands/configure.py +++ b/panoptes_cli/commands/configure.py @@ -33,7 +33,10 @@ def configure(ctx, edit_all): show_default=not is_password, ) - if not ctx.parent.config['endpoint'].startswith('https://'): + # If not connecting to local host (e.g. panoptes running locally) + # and endpoint is not https, refuse connection! + if ('localhost' not in ctx.parent.config['endpoint'] + and not ctx.parent.config['endpoint'].startswith('https://')): click.echo( 'Error: Invalid endpoint supplied. Endpoint must be an HTTPS URL.' )