Skip to content

Commit

Permalink
Added SLAM_CERT
Browse files Browse the repository at this point in the history
  • Loading branch information
maricaantonacci committed Apr 16, 2019
1 parent d19b636 commit fb7e87c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def avatar(email, size):
orchestratorUrl = app.config.get('ORCHESTRATOR_URL')
slamUrl = app.config.get('SLAM_URL')
cmdbUrl = app.config.get('CMDB_URL')
slam_cert = app.config.get('SLAM_CERT')

@app.route('/settings')
def show_settings():
Expand Down Expand Up @@ -64,7 +65,10 @@ def get_slas(access_token):
headers = {'Authorization': 'bearer %s' % (access_token)}

url = slamUrl + "/rest/slam/preferences/" + session['organisation_name']
response = requests.get(url, headers=headers, timeout=20)
verify = True
if slam_cert:
verify = slam_cert
response = requests.get(url, headers=headers, timeout=20, verify=verify)
app.logger.info("SLA response status: " + str(response.status_code))

response.raise_for_status()
Expand Down

0 comments on commit fb7e87c

Please sign in to comment.