diff --git a/cobalt/loader/cors_preflight.cc b/cobalt/loader/cors_preflight.cc index 46172a83de957..5872cae3383fd 100644 --- a/cobalt/loader/cors_preflight.cc +++ b/cobalt/loader/cors_preflight.cc @@ -244,6 +244,9 @@ bool CORSPreflight::IsPreflightNeeded() { if (force_preflight_) { return true; } + if (cors_policy_ == network::kCORSOptional) { + return false; + } // Preflight is not needed if the request method is CORS-safelisted request // method and all headers are CORS-safelisted request-header. std::vector unsafe_headers;