Skip to content

Conversation

@antti-ucla
Copy link
Contributor

What

This PR adds a User-Agent header to the HTTP request made by test_challenges.py module in Ansible letsencrypt role. The test challenge step is performed by during provisioning.

Why?

Some hosts have a Web Application Firewall. It's a common rule to block an HTTP request with no User-Agent header. This happened to me when setting up AWS Cloudfront with a WAF in front of Trellis sites.

Also, while not required by this RFC, adding the header is labeled as a "SHOULD".

Finally, having the header in the request would also help when debugging. It's easier to identify the failed test challenge request when its User-Agent contains "Trellis" and "Ansible".

@antti-ucla antti-ucla changed the title Add a User-Agent header to test_challenges.py. Add a User-Agent header to test_challenges.py Aug 18, 2025
@swalkinshaw
Copy link
Member

Thank you!

@swalkinshaw swalkinshaw merged commit 55f2870 into roots:master Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants