security_model_version_ = 2;
if (app_data_->csp_info() == NULL ||
app_data_->csp_info()->security_rules().empty()) {
- csp_rule_ = kDefaultCSPRule;
+ // Add the workaround codes for backward compatibility with tizen 2.x
+ // by request of webengine. In the webapp of tizen 2.x, this patch allows
+ // the all CSP policy by using "allow *;" option.
+ if (app_data_->tizen_application_info() != NULL &&
+ !app_data_->tizen_application_info()->required_version().empty()) {
+ std::string tizen_version = app_data_->tizen_application_info()->required_version();
+ if (tizen_version[0] == '2')
+ csp_rule_ = "allow *;";
+ else
+ csp_rule_ = kDefaultCSPRule;
+ } else {
+ csp_rule_ = kDefaultCSPRule;
+ }
} else {
csp_rule_ = app_data_->csp_info()->security_rules();
}