이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Metadata

ID: javascript-express/reduce-server-fingerprinting

Language: JavaScript

Severity: Warning

Category: Security

CWE: 693

Description

Improve your overall server security by taking the step to reduce the likelihood of server fingerprinting the software being used on the server.

By default, Express.js sends the X-Powered-By response header banner which can be disabled with app.disable('X-Powered-By').

If you’re using helmet, you can use either of these methods too:

  • app.use(hidePoweredBy())
  • app.use(helmet.hidePoweredBy())

Learn More

Non-Compliant Code Examples

const app = express()

// express() is called but none of the following were detected afterwards
// app.disable('x-powered-by')
// app.use(hidePoweredBy())
// app.use(helmet.hidePoweredBy())

Compliant Code Examples

const app = express()

app.use(helmet.hidePoweredBy());

// rest of your config
const app = express()

app.use(hidePoweredBy())

// rest of your config
const app = express()

app.disable('x-powered-by')

// rest of your config
PREVIEWING: aliciascott/DOCS-9725-Cloudcraft