Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CB-8941 Adds support for subdomain whitelisting
Finds //*. in access origins and creates access objects with the base domain and subdomains set true.

github: close #187
  • Loading branch information
timwindsor authored and bryanhiggins committed Jul 22, 2015
1 parent 8b36c31 commit 17da3f73583b60cac2d4f5689eeaba5c17697bf6
Showing 1 changed file with 5 additions and 1 deletion.
@@ -197,7 +197,11 @@ function processWidgetData(data, widgetConfig, session) {
throw localize.translate("EXCEPTION_FEATURE_DEFINED_WITH_WILDCARD_ACCESS_URI_OR_ORIGIN");
}
widgetConfig.hasMultiAccess = true;
} else {
} else if (originExist && attribs.origin.indexOf("//*.") > 0) {
// handle <access origin="http://*.google.com" /> CB-8941
var baseOrigin = attribs.origin.replace("//*.", "//");
widgetConfig.accessList.push(createAccessListObj(baseOrigin, true));
}else {
attribs.subdomains = packagerUtils.toBoolean(attribs.subdomains);
if (attribs.uri || attribs.origin) {
if (uriExist === true && originExist === true) {

0 comments on commit 17da3f7

Please sign in to comment.