is-redirectable-url

1.0.2 • Public • Published

is-redirectable-url

Build Status

Check url is redirectable to avoid open redirect vulnerability.

How to use

npm install is-redirectable-url
const isRedirectableUrl = require('is-redirectable-url')
isRedirectableUrl('/') // true
isRedirectableUrl('/foo') // true
isRedirectableUrl('http://evil.co.jp') // false
isRedirectableUrl('//evil.co.jp') // false
isRedirectableUrl('/ /evil.co.jp') // true http://example.com/%20/evil.co.jp

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    3
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i is-redirectable-url

Weekly Downloads

3

Version

1.0.2

License

MIT

Last publish

Collaborators

  • yosuke-furukawa