File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed
src/pages/quasar-cli-vite/developing-ssr Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ import compression from 'compression'
22
22
export function create ( /* { ... } */ ) {
23
23
const app = express ( )
24
24
25
+ // attackers can use this header to detect apps running Express
26
+ // and then launch specifically-targeted attacks
27
+ app . disable ( 'x-powered-by' )
28
+
25
29
// place here any middlewares that
26
30
// absolutely need to run before anything else
27
31
if ( process . env . PROD ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ import compression from 'compression'
22
22
export function create ( /* { ... } */ ) {
23
23
const app = express ( )
24
24
25
+ // attackers can use this header to detect apps running Express
26
+ // and then launch specifically-targeted attacks
27
+ app . disable ( 'x-powered-by' )
28
+
25
29
// place here any middlewares that
26
30
// absolutely need to run before anything else
27
31
if ( process . env . PROD ) {
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ import compression from 'compression'
38
38
export function create (/* { ... } */ ) {
39
39
const app = express ()
40
40
41
+ // attackers can use this header to detect apps running Express
42
+ // and then launch specifically-targeted attacks
43
+ app .disable (' x-powered-by' )
44
+
41
45
// place here any middlewares that
42
46
// absolutely need to run before anything else
43
47
if (process .env .PROD ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ import compression from 'compression'
22
22
export function create ( /* { ... } */ ) {
23
23
const app = express ( )
24
24
25
+ // attackers can use this header to detect apps running Express
26
+ // and then launch specifically-targeted attacks
27
+ app . disable ( 'x-powered-by' )
28
+
25
29
// place here any middlewares that
26
30
// absolutely need to run before anything else
27
31
if ( process . env . PROD ) {
You can’t perform that action at this time.
0 commit comments