diff --git a/frontend/src/index.jsx b/frontend/src/index.jsx index c6aaa4d955..51b487dc41 100644 --- a/frontend/src/index.jsx +++ b/frontend/src/index.jsx @@ -14,6 +14,7 @@ import store from './store'; import MetricsPoller from './metrics-poller'; import App from './component/app'; import ScrollToTop from './component/scroll-to-top'; +import { writeWarning } from './security-logger'; let composeEnhancers; @@ -21,6 +22,7 @@ if (process.env.NODE_ENV !== 'production' && window.__REDUX_DEVTOOLS_EXTENSION_C composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__; } else { composeEnhancers = compose; + writeWarning(); } const unleashStore = createStore(store, composeEnhancers(applyMiddleware(thunkMiddleware))); diff --git a/frontend/src/security-logger.js b/frontend/src/security-logger.js new file mode 100644 index 0000000000..7f0197b956 --- /dev/null +++ b/frontend/src/security-logger.js @@ -0,0 +1,9 @@ +export const writeWarning = () => { + // eslint-disable-next-line no-console + console.log( + `%cThis is a warning! +Please do not use any JavaScript using copy/paste +from elsewhere on the web or any person.`, + 'color:white;font-size: 1.8em;background:red' + ); +};