Next update of asm89/stack-cors might break D8 core tests (fix for Chrome CORS)

Created on 24 October 2019, about 5 years ago
Updated 27 February 2023, almost 2 years ago

Chrome 77 made a change that requires code 204 to be returned from preflight OPTIONS requests, rather than code 200 (otherwise results in long response times for some API requests). This change is reflected in a recent commit to the asm89/stack-cors project here: https://github.com/asm89/stack-cors/commit/a779b74d5719b8a752dbb5fa83453...

Drupal core has automated tests in tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php::CorsIntegrationTest but it is unclear if these tests check the preFlight response.

Once a new version of asm89/stack-cors is released, either:

  • Update automated tests to handle the 204 response from CORS
  • OR: Add a new test for the preflight response handling.

This could be a minor issue if existing tests are not affected. But is a change in asm89/stack-cors for core devs to be aware of.

Also posting this for people searching for why CORS is broken (results in long response times) in D8.x with the latest Chrome 77 version. Until there is an official release of asm89/stack-cors, we will likely be pointing to the specific commit hash in our composer.json

πŸ› Bug report
Status

Closed: outdated

Version

10.1 ✨

Component
Request processingΒ  β†’

Last updated 7 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States mpotter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024