https://github.com/thisislawatts/notlinking
Hot linking getting you down? Stop them linking with Not Linking.
https://github.com/thisislawatts/notlinking
Last synced: about 2 months ago
JSON representation
Hot linking getting you down? Stop them linking with Not Linking.
- Host: GitHub
- URL: https://github.com/thisislawatts/notlinking
- Owner: thisislawatts
- License: gpl-3.0
- Created: 2016-10-13T16:34:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-14T09:36:24.000Z (over 9 years ago)
- Last Synced: 2025-07-09T16:11:29.659Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](http://www.trackerfr.ee/).
This tiny slice of middleware for [express](http://expressjs.com/) 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
---
```js
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'
}));
```