Skip to content

Hot linking getting you down? Stop them linking with Not Linking.

License

Notifications You must be signed in to change notification settings

thisislawatts/notlinking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Not Linking

Hot linking getting you down? Stop them linking with Not Linking.

Originally built to offer a layer of protection for font files which are available for self hosting. This tiny slice of middleware for express checks a request and makes sure that this file is only available if the Referrer matches the current server's address.

Installation

npm install notlinking

Usage

const express = require('express');
const notlinking = require('notlinking');

app.use(notlinking());

// Available options
app.use(notlinking({
	pattern      : /regex/,
	publisherUrl : 'http://example.com',
	message      : 'Customisable message for would be thieves'
}));

About

Hot linking getting you down? Stop them linking with Not Linking.

Resources

License

Stars

Watchers

Forks

Packages

No packages published