Opened 4 years ago

Last modified 3 years ago

#32397 closed Cleanup/optimization

django-admin start[project|app] doesn't send proper user agent header when HTTP(S) url is sent. — at Version 1

Reported by: rsp2k Owned by: rsp2k
Component: Core (Management commands) Version: 3.1
Severity: Normal Keywords:
Cc: Ad Timmering Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by rsp2k)

By default, when fetching a remote template, django-admin start[app|project] uses the default urllib User Agent which causes some sites to block requests (namely gitlab, since they use cloudflare See https://gitlab.com/gitlab-org/gitlab/-/issues/219669).

This patch sets the 'User Agent' header to Django/DJANGO_VERSION.

Change History (2)

comment:1 by rsp2k, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top