Repository navigation
Keep the .opml suffix rule out of /.well-known/ - #51
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With SocialSpec active,
/.well-known/following.opmlwas a 404. The.opmlsuffix rule of the plugin (^(.+?)\.opml$) comes before the rule of SocialSpec, so the request went to a page called.well-known/following, which does not exist.The suffix rule now leaves everything under
/.well-known/alone:^(?!\.well-known/)(.+?)\.opml$. Nothing there is a page, and the files belong to whoever serves them. That also means the well-known rules of the plugin no longer have to come before it.The suffix rule is part of the check for stale rules now, so existing sites flush once after the update. Without that, a site that already has SocialSpec would keep the old rule, since nothing else about its rules changes.
The bug only shows with permalinks like
/%year%/%monthnum%/%postname%/. With/%postname%/WordPress checks that a page exists before it takes a page rule and moves on, so the test uses the date structure. Found by testing the SocialSpec hand-over from #47 on a local site.