Skip to content

Commit

Permalink
Add reason for this header.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter Tolsma authored and Pieter Tolsma committed Mar 7, 2024
1 parent cff89ed commit 5281921
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terracotta/scripts/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
def build_request(url: str) -> urllib.request.Request:
"""
Build a request object with headers that mimic a web browser.
This is for example needed to bypass cloudflare protection for automated scraping,
in the case where terracotta is behind the cloudflare proxy.
"""
req = urllib.request.Request(url)
req.add_header(
Expand Down

0 comments on commit 5281921

Please sign in to comment.