Add a note about referrer tracking

This commit is contained in:
Nicolas Gallagher
2019-01-01 15:38:22 -08:00
parent dce5b7321d
commit 6c725357ff
@@ -175,7 +175,10 @@ const createDOMProps = (component, props, styleResolver) => {
if (nativeID && nativeID.constructor === String) { if (nativeID && nativeID.constructor === String) {
domProps.id = nativeID; domProps.id = nativeID;
} }
// Link security and automation test ids // Link security
// https://mathiasbynens.github.io/rel-noopener/
// Note: using "noreferrer" doesn't impact referrer tracking for https
// transfers (i.e., from https to https).
if (component === 'a' && domProps.target === '_blank') { if (component === 'a' && domProps.target === '_blank') {
domProps.rel = `${domProps.rel || ''} noopener noreferrer`; domProps.rel = `${domProps.rel || ''} noopener noreferrer`;
} }