Skip to content

fix: count a subsite's own home host as its uploads host - #26

Merged
oxyc merged 1 commit into
mainfrom
fix/upload-host-own-home
Dec 1, 2026
Merged

oxyc merged 1 commit into
mainfrom
fix/upload-host-own-home

Conversation

@oxyc

@oxyc oxyc commented Dec 1, 2026

Copy link
Copy Markdown
Member

On a Bedrock network, WP_CONTENT_URL comes from WP_HOME, which follows the request's host. An audit run as the main site therefore sees a subsite's uploads URL on the main host. It then flagged every Gravity Forms link the subsite stored on its own domain as retention:upload-host, even though the subsite stores and deletes those links on that host. On snellmanecom that was 189 links on snellmanpetfood.com reported as "uploads on snellmanpetfood.generodigital.com".

A subsite's home host now counts as an uploads host as well. Any other host (an old domain, www vs non-www) is still flagged, and single sites and main sites are unchanged.

Tested:

  • The collector from this branch, run read-only on snellmanecom production, reports no upload_hosts; it reported 189 links on blog 2 before.
  • On snellmanpetfood.com's own host, all 86 recent upload links matched Gravity Forms' upload root and their files were found, so the defaults.php delete filter works there.
  • go test ./... passes.

🤖 Generated with Claude Code

On a Bedrock network WP_CONTENT_URL follows the request's host, so an
audit run as the main site saw a subsite's uploads on the main host and
flagged every upload link the subsite stored on its own domain, though
Gravity Forms stores and deletes them there. A subsite's home host now
counts as its uploads host too; any other host is still flagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oxyc
oxyc merged commit 64b82f1 into main Dec 1, 2026
2 checks passed
@oxyc
oxyc deleted the fix/upload-host-own-home branch December 1, 2026 16:21
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.

1 participant