verify-link

Verify external links exist.

Verify external absolute links return valid HTTP status codes.

A valid status code is 200, 301 or 302. In the case of the redirect status codes the target server must send a Location header otherwise an error is thrown. Redirects are followed until maxRedirects is reached.

new VerifyLink(context, options)

Create a VerifyLink plugin.

Configure this plugin for the verify phase. Requires that the http-cache and graph-resources plugins have been configured.

VerifyLink.prototype.after(context, options)

Verifies that external absolute links (those with a protocol) return a 200 or 3xx HTTP status code.

When strict is disabled an error is not thrown but a warning message is logged.