[PDB Tech] non-canonical queries losing auth on redirect to canonical

Chris Caputo ccaputo at alt.net
Tue Aug 9 14:57:26 PDT 2022


It is important to query against the canonical "www.peeringdb.com".

Python and presumably other libraries will drop the authentication request 
header on a redirect, as a safety precaution:

  https://github.com/psf/requests/blob/177dd90f/requests/sessions.py#L284-L296

Unfortunately, when this happens is opaque because PeeringDB will try to 
satisfy what it thinks is simply an anonymous request.

If you have an opinion on whether it makes sense for PeeringDB to stop 
redirecting API requests, check out:

  https://github.com/peeringdb/peeringdb/issues/1139

Chris


More information about the Pdb-tech mailing list