Skip to content

Commit 82aff83

Browse files
committed
Remove csrf implementation
1 parent 39afc58 commit 82aff83

File tree

4 files changed

+0
-42
lines changed

4 files changed

+0
-42
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"module-alias": "2.2.2",
6767
"node-polyfill-webpack-plugin": "1.1.4",
6868
"process": "0.11.10",
69-
"randomstring": "1.2.2",
7069
"react-app-polyfill": "3.0.0",
7170
"serialize-javascript": "6.0.0",
7271
"terser-webpack-plugin": "5.3.1",

src/bootstrap/server/createReactAppOnServer.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const ReactDOMServer = require('react-dom/server');
22
const path = require('path');
33
const detectDevice = require('./utils/detectDevice');
44
const detectLocale = require('./utils/detectLocale');
5-
const handleCsrfProtection = require('./utils/handleCsrfProtection');
65
const getRealPath = require('./utils/getRealPath');
76
const generateHtmlSnippets = require('./utils/generateHtmlSnippets');
87
const paths = require('../../config/paths');
@@ -13,14 +12,12 @@ module.exports = function createAppOnServer(config) {
1312

1413
const [locale, localeSource] = detectLocale(req, config.intl);
1514
const device = detectDevice(req, config.device);
16-
const csrf = handleCsrfProtection(req, res, config.csrf);
1715
const [basename, realPath] = getRealPath(url, locale, localeSource);
1816

1917
const ctx = {
2018
basename,
2119
path: realPath,
2220
ssr: config.ssr,
23-
csrf,
2421
device,
2522
intl: {
2623
locale,

src/bootstrap/server/defaultConfig.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ module.exports = {
33
port: 8080,
44
proxies: [],
55
ssr: true,
6-
csrf: {
7-
protection: true,
8-
headerName: 'X-Csrf-Token',
9-
cookieName: 'csrf',
10-
},
116
device: {
127
detection: true,
138
cookieName: 'view',

src/bootstrap/server/utils/handleCsrfProtection.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)