[Pulp-list] Access Pulp 3 Api from a remote machine

Bin Li (BLOOMBERG/ 120 PARK) bli111 at bloomberg.net
Wed Oct 2 15:22:54 UTC 2019


Updated /etc/pulp/settings.py to use ALLOWED_HOSTS = ['*'] and restarted all services. Still getting 403 errors.
Also tried adding PULP_ALLOWED_HOSTS to /etc/systemd/system/multi-user.target.wants/pulp-api.service and replacing localhost with 0.0.0.0 as below
Environment=PULP_ALLOWED_HOSTS="['*']"
ExecStart=/usr/local/lib/pulp/bin/gunicorn pulpcore.app.wsgi:application \
          --bind '0.0.0.0:24817' \
--access-logfile

The problem persists.


From: brocha at redhat.com At: 10/02/19 10:37:17To:  Bin Li (BLOOMBERG/ 120 PARK ) 
Cc:  mikedep333 at redhat.com,  pulp-list at redhat.com
Subject: Re: [Pulp-list] Access Pulp 3 Api from a remote machine


We do have ALLOWED_HOSTS = '*' in /etc/pulp/settings.py

This variable must be a list, not sure if that is the problem.

ALLOWED_HOSTS = ['*']

As environment variable it would be export PULP_ALLOWED_HOSTS="['*']"

https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20191002/165e4882/attachment.htm>


More information about the Pulp-list mailing list