Repository navigation
REST API: Add the rest_allowed_cors_methods filter and stop discarding a response's method list. #13151
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
Open
moonmeister
wants to merge
43
commits into
WordPress:trunk
Choose a base branch
from
moonmeister:fix/rest-cors-allow-methods-clobber
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
REST API: Add the rest_allowed_cors_methods filter and stop discarding a response's method list. #13151
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
3f08a51
fix: tests and conditional set of defaults
moonmeister 694fccd
REST API: Add the `rest_allowed_cors_methods` filter.
moonmeister 8bb0c27
REST API: Trim the ordering comment in `rest_send_cors_headers()`.
moonmeister d8de848
Merge branch 'trunk' into fix/rest-cors-allow-methods-clobber
moonmeister 91580d9
REST API: Let `rest_allowed_cors_methods` override a response's metho…
moonmeister 353f3ba
Merge branch 'fix/rest-cors-allow-methods-clobber' of github.com:moon…
moonmeister 4f7a663
Merge branch 'trunk' into fix/rest-cors-allow-methods-clobber
moonmeister 85c3d9b
Merge branch 'trunk' into fix/rest-cors-allow-methods-clobber
adamsilverstein c1f3194
Merge branch 'trunk' into fix/rest-cors-allow-methods-clobber
adamsilverstein 696734b
Merge branch 'trunk' into fix/rest-cors-allow-methods-clobber
adamsilverstein d2c2f0e
Add missing ext-xdebug to suggest in composer.json
westonruter 86857b2
Fix PHPStan errors in tests
westonruter 326b89e
Add native type hints for params
westonruter f961c3e
Apply batched suggestions from code review
adamsilverstein f1de1db
Fix syntax error from prior suggestion
westonruter f862087
REST API: Fix the parse error in rest_send_cors_headers().
adamsilverstein 9a017d9
Tests: Drop the Xdebug dependency from the REST CORS header tests.
adamsilverstein 62058a0
REST API: Harden the arguments to rest_send_cors_headers().
adamsilverstein 674e883
REST API: Remove the CORS methods header when the filtered list is em…
adamsilverstein 3756a7f
REST API: Validate CORS methods from the response by syntax, not the …
moonmeister a8fc56d
Merge branch 'trunk' into fix/rest-cors-allow-methods-clobber
moonmeister 55010b8
REST API: Send CORS headers through WP_REST_Server instead of raw hea…
moonmeister ca6d58d
Merge branch 'fix/rest-cors-allow-methods-clobber' of github.com:moon…
moonmeister fab020a
Fix PHPStan errors
westonruter f5c14f6
Fix PHPStan errors in tests
westonruter e8ecdd9
Add a since tag
westonruter 96b7592
REST API: Keep the WP_REST_Server::send_header() signature unchanged.
westonruter 2614921
REST API: Drop the native parameter types from rest_send_cors_headers().
westonruter 2a02e41
REST API: Avoid setting up the REST server from rest_send_cors_header…
westonruter a557b2e
REST API: Validate the filtered CORS method list.
westonruter 9c01533
REST API: Fall back to the default CORS methods for an unusable respo…
westonruter 9359781
Docs: Note the `$server` parameter of rest_send_cors_headers() in its…
westonruter fc72d81
Add phpdoc to address PHPStan error for closure return value
westonruter 382df14
REST API: Reject CORS methods with a trailing newline.
westonruter 24664ea
REST API: Drop CORS method entries that are not strings.
westonruter c40d5dd
REST API: Split filtered CORS method entries like a string value.
westonruter 68bfacd
REST API: Remove the CORS methods header for an empty list without a …
westonruter 06f2f2c
Tests: Describe how the REST CORS header tests observe headers.
westonruter a33ad8f
Tests: Use the default CORS methods constant in the assertions.
westonruter 2715e83
Tests: Restore the request method after the REST CORS header tests.
westonruter 852f1f0
REST API: Ignore a filtered CORS method value that is not a list.
westonruter 08385b0
REST API: Send each CORS method only once.
westonruter 8b844f8
Tests: Restore the Origin after the REST CORS header tests.
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.