Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2021 at 18:07 UTC
Updated:
1 Nov 2023 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
jedihe commentedComment #4
jedihe commentedComment #5
d34dman commentedMentioned in : https://drupalcontributions.opensocial.site/node/66
Cross linking to make it easier to find :)
Comment #6
jedihe commentedTests pass, let's now ask for review :)
Comment #9
andypost++ to add
Comment #10
jedihe commentedJust wrote the draft for the CR. Added a TODO:
Comment #11
jedihe commentedJust tried running core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php with allowedOriginsPatterns set to .* in a test where allowedOrigins is set to restrict the matches and found that .* gets all domains to match.
Given this, I think the best is to set allowedOriginsPatterns to an empty array by default so all existing sites continue working the same as they currently do:
Comment #12
jedihe commentedCR ready.
Comment #13
jedihe commentedComment #14
jedihe commentedComment #17
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #19
mr.baileysComment #21
dpagini commentedI'm going to bump this RTBC to get some more eyes on this. I have been using this
allowedOriginsPatternsin production for the better part of a year, with a note in my codebase that this is undocumented in Drupal core. I think this should go into core to let people know it's an available option for them.Comment #22
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #23
nod_Need a patch/mr against 11.x
Comment #25
mr.baileysTried to rebase but ran into too many issues, so I cherry-picked the commits and created a new MR. I have updated the
CorsIntegrationTest: the original test in this issue was written against asm89/stack-cors 1.x, while 11.x uses 2.x. The latter no longer returns http status code 403 for disallowed origins (see #3128982: Upgrade asm89/stack-cors to ^2.0 to fix cacheability).Comment #26
smustgrave commentedTweaked the CR a bit for 10.2
Comment #27
quietone commentedI'm triaging RTBC issues. I read the IS and the comments. I didn't find any unanswered questions.
However, I do not see any comments that someone has reviewed the code.
I am setting back to NR for a code review.
Comment #28
darren ohI have reviewed the code many times. It is not necessary for someone to post a comment saying, "I have reviewed the code," for the RTBC status to be valid. Please do not unnecessarily block progress on issues.
Comment #31
longwaveThe change is effectively one line of sample code and the additional test coverage is comprehensive.
Committed and pushed 08b493a202 to 11.x and d9986292c5 to 10.2.x. Thanks!
Also published the change record.
Comment #32
dpagini commentedWoohoo, thanks @longwave!