Skip to content

Default tree import requests get blocked by Cloudflare #7818

@alesan99

Description

@alesan99

Describe the bug
Default tree import requests (for default geography and chronostrat trees) from the backend are blocked by Cloudflare's Bot Fight Mode.
URLs cannot be exempt from bot detection in Bot Fight Mode, so the only solution currently is to disable it outright.

To Reproduce
Steps to reproduce the behavior:

  1. Assuming Bot Fight Mode is enabled:
  2. Create a new discipline in the System Configuration with a geography tree
  3. See that tree creation fails in the logs (Request Forbidden)

Expected behavior
Currently, tree mapping files are requested without any headers. Backend requests should have some sort of identification that distinguishes them from bot traffic.

resp = requests.get(mapping_url)

Crash Report

2026-03-16T17:26:55.061Z [16/Mar/2026 12:26:55] [WARNING] [specifyweb.backend.setup_tool.tree_defaults:131] Error trying to preload Geography tree: 403 Client Error: Forbidden for url: https://files.specifysoftware.org/treerows/geography.json
  • Specify 7 Version: 7.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions