Skip to content

Commit

Permalink
Add User-Agent header to avoid 403 Forbidden error when downloading m…
Browse files Browse the repository at this point in the history
…etadata from poste.it
  • Loading branch information
delzotto committed Mar 14, 2024
1 parent ccd7f84 commit f3e1f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/djangosaml2_spid/management/commands/update_idps.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def download_identity_providers(self):
indentation_level=1,
)

#Add User-Agent heder to avoid 403 Forbidden error when downloading metadata from poste.it
#Add User-Agent header to avoid 403 Forbidden error when downloading metadata from poste.it
with requests.get(idp_metadata_url, verify=True, headers={'User-Agent': ''}) as response:
identity_provider["metadata"] = response.text

Expand Down

0 comments on commit f3e1f7b

Please sign in to comment.