diff --git a/server/.env.example b/server/.env.example index 6913ddc..025d43d 100755 --- a/server/.env.example +++ b/server/.env.example @@ -38,6 +38,7 @@ CISCO_USER=serti.xx CISCO_PASSWORD=senhadacontroladoracisco # Palo Alto +PA_HOST=10.1.0.2 PA_USER=pti PA_PASSWORD=senhadopaloaltocompermissaoparaapi PA_NET=10.7. \ No newline at end of file diff --git a/server/src/utils/paloalto.js b/server/src/utils/paloalto.js index 972bd3d..dfce05e 100644 --- a/server/src/utils/paloalto.js +++ b/server/src/utils/paloalto.js @@ -29,24 +29,25 @@ async function updateUserIdMappings() { await Promise.all( wifiDevices.map(async device => { + const cmd = ` + + 1.0 + update + + + + + + + + ` return axios.get( - 'https://10.7.0.2/api/', + `https://${process.env.PA_HOST}/api/`, { params: { type: 'user-id', - cmd: ` - - 1.0 - update - - - - - - - - ` + cmd }, headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, httpsAgent: agent,