La til autentikasjon i klienten

This commit is contained in:
2022-01-21 11:58:39 +01:00
parent fe9da5ba89
commit 72fb716199
2 changed files with 5 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ else:
try:
start = time.time()
img = {'image': open('latest.jpg', 'rb')}
response = requests.post(config.config['uploadurl'], files=img)
response = requests.post(config.config['uploadurl'], files=img, headers={'Authorization': 'Basic ' + config.config['key']})
end = time.time()
except Exception as e:
logging.info('Feil under opplasting: {0}'.format(e))