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

Website: Fix deploy-time check for file with PHP-handled redirect #1350

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

brandonpayton
Copy link
Member

@brandonpayton brandonpayton commented Apr 30, 2024

What is this PR doing?

This PR solves an issue where /wordpress.html was not being served by PHP because it was not moved into files-to-serve-via-php during website deploy. And it was not being moved because the should-serve-via-PHP check relied upon the current referer, which is something we don't know at deploy time.

How is the problem addressed?

This PR solves the issue by having the maybe-redirect function return a declaration of its intent to redirect for specific referers. Then we can see there is need for special treatment at deploy time, and the request handler can see the declaration and act upon it at request time.

Testing Instructions

  • Tested manually via SSH on playground-dot-wordpress-dot-net.atomicsites.blog.
  • Will also test post-deploy by manually running the deploy workflow for WP Cloud and confirming the fix afterward

Related to #1197

@brandonpayton brandonpayton self-assigned this Apr 30, 2024
@brandonpayton brandonpayton added the [Type] Bug An existing feature does not function as intended label Apr 30, 2024
@brandonpayton brandonpayton merged commit c04bbc5 into trunk Apr 30, 2024
5 checks passed
@brandonpayton brandonpayton deleted the fix-wp-org-redirect branch April 30, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Website [Package][@wp-playground] Website [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant