Skip to content

Commit

Permalink
Add User-Agent heder to avoid 403 Forbidden error when downloading me…
Browse files Browse the repository at this point in the history
…tadata from poste.it
  • Loading branch information
delzotto committed Mar 14, 2024
1 parent b0dfd84 commit ccd7f84
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 metada from poste.it
#Add User-Agent heder 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 ccd7f84

Please sign in to comment.