mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
Add a note about referrer tracking
This commit is contained in:
@@ -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`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user