1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Changed NAPALM- prefix to X-NAPALM-

This commit is contained in:
Saria Hajjar
2020-01-09 16:48:26 +00:00
parent 60e4812b32
commit 9d085ad83a
2 changed files with 7 additions and 7 deletions

View File

@@ -404,10 +404,10 @@ class DeviceViewSet(CustomFieldModelViewSet):
# Update NAPALM parameters according to the request headers
for header in request.headers:
if header[:7].lower() != 'napalm-':
if header[:9].lower() != 'x-napalm-':
continue
key = header[7:]
key = header[9:]
if key.lower() == 'username':
username = request.headers[header]
elif key.lower() == 'password':