mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
Fixing CSRF issues (#2569)
* 0.17.4 * Fixing CSRF issues Since turning CSRF across the site with Flask-WTF, a few POST request have been failing. This PR addresses these issues.
This commit is contained in:
committed by
GitHub
parent
3ed45ab98c
commit
ddeabdd048
@@ -7,7 +7,9 @@ import { Provider } from 'react-redux';
|
||||
import thunk from 'redux-thunk';
|
||||
import { now } from '../modules/dates';
|
||||
import { initEnhancer } from '../reduxUtils';
|
||||
import AlertsWrapper from '../components/AlertsWrapper';
|
||||
import { getControlsState, getFormDataFromControls } from './stores/store';
|
||||
import { initJQueryAjaxCSRF } from '../modules/utils';
|
||||
|
||||
|
||||
// jquery and bootstrap required to make bootstrap dropdown menu's work
|
||||
@@ -15,6 +17,7 @@ const $ = window.$ = require('jquery'); // eslint-disable-line
|
||||
const jQuery = window.jQuery = require('jquery'); // eslint-disable-line
|
||||
require('bootstrap');
|
||||
require('./main.css');
|
||||
initJQueryAjaxCSRF();
|
||||
|
||||
const exploreViewContainer = document.getElementById('js-explore-view-container');
|
||||
const bootstrapData = JSON.parse(exploreViewContainer.getAttribute('data-bootstrap'));
|
||||
@@ -47,7 +50,10 @@ const store = createStore(exploreReducer, bootstrappedState,
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<ExploreViewContainer />
|
||||
<div>
|
||||
<ExploreViewContainer />
|
||||
<AlertsWrapper />
|
||||
</div>
|
||||
</Provider>,
|
||||
exploreViewContainer
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user