National Poo Museum

    @f0c1s/x-powered-by
    TypeScript icon, indicating that this package has built-in type declarations

    2021.4.19 • Public • Published

    node-X-Powered-By

    Manage X-Powered-By | This helps in removing or adding any random value to response header

    Usage:

    const app = require('express')()
    const {remove, manage} = require('@f0c1s/x-powered-by')
    
    app.get('/has', (req, res) => {
        const data = res.getHeader('x-powered-by')
        console.log(data)
        res.send(data)
    })
    
    app.use(remove())
    app.get('/nope', (req, res) => {
        const data = res.getHeader('x-powered-by')
        console.log(data)
        res.send(data)
    })
    
    app.use(manage('a-new-value'))
    app.get('/managed', (req, res) => {
        const data = res.getHeader('x-powered-by')
        console.log(data)
        res.send(data)
    })
    
    app.listen(9001)

    Install

    npm i @f0c1s/x-powered-by

    DownloadsWeekly Downloads

    7

    Version

    2021.4.19

    License

    MIT

    Unpacked Size

    13.6 kB

    Total Files

    15

    Last publish

    Collaborators

    • iamanubhavsaini
    • sainianubhav