CSRF Failure - Referer checking failed - no Referer #895
-
|
I posted this question in the pynetbox GitHub discussion: netbox-community/pynetbox#747 But I thought it might be helpful to ask here as well, since it might be something specific to the Malcolm configuration. I am trying to use pynetbox to modify data in our malcolm netbox instance. It is using basic auth. I can GET with no problem. netbox_base_url = "https://localhost/netbox"
session = requests.Session()
session.auth = (os.environ["NETBOX_USER"], os.environ["NETBOX_PASSWORD"])
nb = pynetbox.api(netbox_base_url)
nb.http_session = session
devices = nb.dcim.devices.all()But when I try to create an object: nb.dcim.devices.create(
{
"name": "test1-core3",
"role": 3,
"site": 1,
"device_type": 1,
"status": 1
}
)I get the following error: I have also tried adding the token Any ideas for what I am doing wrong or how to debug this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I took out the basic auth, added the token back in and now it works. 🤦 Sorry for the noise! |
Beta Was this translation helpful? Give feedback.
I took out the basic auth, added the token back in and now it works. 🤦
Sorry for the noise!