We can not drop some images when drag them to Office365 powerpoint,
because of Office365 powerpoint's CORS check.
This patch make a host whitelist to skip CORS check when drag and
drop image to Office365 powerpoint.
Change-Id: I4caede0dac6c355166a9b2e523e99edd294a0acd
Signed-off-by: jiangyuwei <yuwei.jiang@samsung.com>
if (request_initiator->IsSameOriginWith(request_url))
return false;
+
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Can not drop some images when drag them to Office365 powerpoint,
+ // because of Office365 powerpoint's CORS check.
+ // Make a host whitelist to skip CORS check when drag and drop image
+ // to Office365 powerpoint.
+ static constexpr auto ignore_cors_request_initiator_host = base::MakeFixedFlatSet<base::StringPiece>({
+ "powerpoint.officeapps.live.com"
+ });
+
+ if (base::Contains(ignore_cors_request_initiator_host, request_initiator->host())) {
+ LOG(INFO) << "url: " << request_url << " skip CORS check";
+ return false;
+ }
+#endif
return true;
}