You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

kiss-injection-dev-server

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kiss-injection-dev-server

A server which works as a proxy injecting scripts to htmls

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Kiss Injection Dev Server

This dev server provides development environment in which script can be injected directly as the last child of head element. The server contains two parts, proxy server and static server. Proxy server intercepts requests and injects a script. Static server serves the script injected by the proxy server.

Installing

$ npm install --save-dev kiss-injection-dev-server

API and Examples

// just import this package
const devServer = require('kiss-injection-dev-server');

// launch the dev server
devServer({
    // (optional) proxy server's port: default to 8080
    proxyServerPort: '8080',

    // (optional) static server ip: default to '127.0.0.1'
    staticServerIp: '127.0.0.1',

    // (optional) static server port: default to 8081
    staticServerPort: '8081',

    // (optional) the name of injection script: default to Injection.js
    injectionScriptFileName: 'Injection.js',

    // (required) the folder where injection script lives in
    injectionScriptDir: 'folder/of/your/injectionScript'
})

Whether dev server works

You can inspect the response headers in your browser and check if there is a header 'X-proxied-by': ''

Keywords

nodejs

FAQs

Package last updated on 19 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts