2018-02-20 02:35:31 +02:00
|
|
|
import { canUseDOM } from 'exenv';
|
|
|
|
|
|
|
|
export default (() => {
|
|
|
|
if (!canUseDOM) {
|
2018-03-07 17:36:32 +02:00
|
|
|
return {
|
|
|
|
cookie: ''
|
|
|
|
};
|
2018-02-20 02:35:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
port: window.location.port,
|
|
|
|
protocol: window.location.protocol.replace(/:$/, ''),
|
|
|
|
hostname: window.location.hostname,
|
2018-03-06 03:14:33 +02:00
|
|
|
origin: window.location.origin,
|
2018-03-07 17:36:32 +02:00
|
|
|
cookie: document.cookie || '',
|
2018-02-20 02:35:31 +02:00
|
|
|
__REDUX_DEVTOOLS_EXTENSION__: window.__REDUX_DEVTOOLS_EXTENSION__,
|
|
|
|
__APOLLO_STATE__: window.__APOLLO_STATE__,
|
|
|
|
__REDUX_STATE__: window.__REDUX_STATE__
|
|
|
|
};
|
|
|
|
})();
|