Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy content via public-api, even when we're on a simple site. #90859

Closed

Conversation

devicenull
Copy link
Contributor

Related to #87642

Proposed Changes

In order to solve #87642, we need to proxy any images in the media area via the public API.

This solves two main cases:

  1. Where the primary redirect is not yet pointed to us via DNS
  2. Where a service like Cloudflare is in front of the primary redirect, and blocks "hotlinking" images

These cases both used to work fine, as media was served from *.files.wordpress.com regardless of the actual domain being used. Once this was been moved to use wp-content/uploads (in order to fix issues when third party cookies are blocked), the two cases above (and probably some others we don't know about) stopped working.

This will not work until D149138-code is deployed

Testing Instructions

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • [n/a] Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • [n/a] Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • [n/a] For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

In order to solve Automattic#87642, we need to proxy any images in the media area via the public API.

This solves two main cases:
1) Where the primary redirect is not yet pointed to us via DNS
2) Where a service like Cloudflare is in front of the primary redirect, and blocks "hotlinking" images

These cases both used to work fine, as media was served from *.files.wordpress.com regardless of the actual
domain being used.  Once this was been moved to use wp-content/uploads (in order to fix issues when third
party cookies are blocked), the two cases above (and probably some others we don't know about) stopped working.
@devicenull devicenull added the [Status] Fix Inbound Use when a fix is in unreleased component label May 17, 2024
@devicenull devicenull removed the [Status] Fix Inbound Use when a fix is in unreleased component label May 20, 2024
@devicenull
Copy link
Contributor Author

D149138-code has been deployed

@devicenull
Copy link
Contributor Author

duplicate of #90895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant