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: Stop disabling cache for non-root index.html files #1461

Merged
merged 1 commit into from
May 23, 2024

Conversation

brandonpayton
Copy link
Member

What is this PR doing?

This PR makes it so the only index.html file set aside to get custom HTTP headers is /index.html.

What problem is it solving?

It is a general improvement for us to be more specific about which file paths get special treatment, but we are making the change now so we can stop setting puzzle/index.html aside to be served by PHP. cc @bgrgicak

How is the problem addressed?

When puzzle/index.html is set aside, it turns out that nginx does not delegate the request to PHP but rather responds with a 403 error. Nginx appears to do this for every existing, non-root directory. We plan to talk with the host about fixing this behavior, but in the meantime, we can avoid it here by excluding puzzle/index.html from receiving "no-cache" headers.

Testing Instructions

I have tested these changes manually via SSH on a staging site. After merging, we will deploy the website and confirm all is well in production.

This is a general improvement, but it was done so we could
stop moving puzzle/index.html aside to be served by PHP.
When puzzle/index.html is set aside, it turns out that nginx
does not delegate the request to PHP but rather responds
with a 403 error. We plan to talk with the host about fixing
this behavior, but in the meantime, we can avoid it here.
@brandonpayton brandonpayton added [Type] Bug An existing feature does not function as intended [Aspect] Website [Package][@wp-playground] Website labels May 23, 2024
@brandonpayton brandonpayton self-assigned this May 23, 2024
@brandonpayton brandonpayton merged commit 1d74b21 into trunk May 23, 2024
1 check passed
@brandonpayton brandonpayton deleted the avoid-403-error-for-puzzle branch May 23, 2024 21:57
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