diff --git a/cobalt/loader/cors_preflight.cc b/cobalt/loader/cors_preflight.cc index 980f4d971f1b..f7faf18d91c3 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;