Socket
Socket
Sign inDemoInstall

tall-plugin-meta-refresh

Package Overview
Dependencies
7
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tall-plugin-meta-refresh

Tall plugin for following redirects in <meta http-equiv="refresh"> tags


Version published
Weekly downloads
190
increased by13.77%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

tall-plugin-meta-refresh

A plugin for tall that allows you to follow meta refresh redirects such as:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>The Tudors</title>
    <meta
      http-equiv="refresh"
      content="3;URL='http://thetudors.example.com/'"
    />
  </head>
  <body>
    <p>
      This page has moved to
      <a href="http://thetudors.example.com/">theTudors.example.com</a>.
      Redirecting you automatically in 3 seconds.
    </p>
  </body>
</html>

Example from W3C.

Installation

With npm:

npm i --save tall-plugin-meta-refresh

or with yarn:

yarn add tall-plugin-meta-refresh

Usage

To enable the plugin on a given tall instance:

import { locationHeaderPlugin, tall } from 'tall'
import { metaRefreshPlugin } from 'tall-plugin-meta-refresh'

const url = await tall('https://example.com/a-link', {
  plugins: [locationHeaderPlugin, metaRefreshPlugin]
})

console.log(url)

Note: the locationHeaderPlugin is the standard behavior (following HTTP header location headers) and it should always be used before the metaRefreshPlugin.

Warning: also be aware that the metaRefreshPlugin will consume the entire HTTP response object, so other plugins that might be added after it won't be able to parse the response body.

Keywords

FAQs

Last updated on 26 Oct 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc