Add a note about referrer tracking

This commit is contained in:
Nicolas Gallagher
2019-01-01 15:38:22 -08:00
parent 7b79c27bd0
commit 97e2fb53a1

View File

@@ -167,6 +167,9 @@ const createDOMProps = (component, props, styleResolver) => {
domProps.id = nativeID;
}
// 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') {
domProps.rel = `${domProps.rel || ''} noopener noreferrer`;
}