Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit b500d0c

Browse files
author
bartvde
committed
Pass in X-CSRFToken as a request header
1 parent 87d22f3 commit b500d0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/geonode.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ global.enMessages = enMessages;
2727
import Save from './save';
2828
import MapUrlLink from '../containers/MapUrlLink';
2929
import {getLocalGeoServer} from '../services/geonode';
30+
import {getCRSFToken} from '../helper';
3031

3132
import '../css/app.css'
3233
import 'boundless-sdk/dist/css/components.css';
@@ -61,6 +62,7 @@ class GeoNodeViewer extends React.Component {
6162
getChildContext() {
6263
return {
6364
proxy: this.props.proxy,
65+
requestHeaders: {'X-CSRFToken': getCRSFToken()},
6466
muiTheme: getMuiTheme(this.props.theme)
6567
};
6668
}
@@ -187,6 +189,7 @@ GeoNodeViewer.defaultProps = {
187189

188190
GeoNodeViewer.childContextTypes = {
189191
proxy: React.PropTypes.string,
192+
requestHeaders: React.PropTypes.object,
190193
muiTheme: React.PropTypes.object
191194
};
192195

0 commit comments

Comments
 (0)