if (!thread_)
return;
-#if BUILDFLAG(IS_TIZEN_TV)
- if (request.headers.count("origin") &&
- !remote_allow_origins_.count(request.headers.at("origin")) &&
- !remote_allow_origins_.count("*")) {
- const std::string& origin = request.headers.at("origin");
- const std::string message = base::StringPrintf(
- "Rejected an incoming WebSocket connection from the %s origin. "
- "Use the command line flag --remote-allow-origins=%s to allow "
- "connections from this origin or --remote-allow-origins=* to allow all "
- "origins.",
- origin.c_str(), origin.c_str());
- Send403(connection_id, message);
- LOG(ERROR) << message;
- return;
- }
-#endif
+ // FIXME: This check will refuse RWI web socket connect,
+ // will cause RWI disabled, shows "websocket disconnect".
+ // Comment this check to use RWI temporarily, and analyse
+ // upstream patch later.
+ // Refer: https://chromium-review.googlesource.com/c/chromium/src/+/4106102
+ // #if BUILDFLAG(IS_TIZEN_TV)
+ // if (request.headers.count("origin") &&
+ // !remote_allow_origins_.count(request.headers.at("origin")) &&
+ // !remote_allow_origins_.count("*")) {
+ // const std::string& origin = request.headers.at("origin");
+ // const std::string message = base::StringPrintf(
+ // "Rejected an incoming WebSocket connection from the %s origin. "
+ // "Use the command line flag --remote-allow-origins=%s to allow "
+ // "connections from this origin or --remote-allow-origins=* to allow
+ // all " "origins.", origin.c_str(), origin.c_str());
+ // Send403(connection_id, message);
+ // LOG(ERROR) << message;
+ // return;
+ // }
+ // #endif
if (base::StartsWith(request.path, browser_guid_,
base::CompareCase::SENSITIVE)) {