• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a conenct/express middleware for evercookie.

Evercookie Middleware for Connect/Express JS

Licence npm version Build Status Maintainability Total alerts Test Coverage Dependencies Status DevDependencies Status PRs Welcome code style: prettier

Express is a sinatra inspired web development framework for node.js, insanely fast, flexible, and simple. Evercookie is a Javascript API that produces extremely persistent cookies in a browser. It is written in JavaScript and additionally uses a SWF (Flash) object for the Local Shared Objects and, originally, PHPs for the server-side generation of cached PNGs and ETags.

This middleware port original PHP script to Connect/Express JS

Support

  • Node: 6 - 11
  • Express: 4.x, 5.x
  • See detail at Build Status

Usage

Install

npm install --save evercookie

In your code

Evercookie backend middleware needs cookie, thus cookieParser() middleware must come before Evercookie backend middleware. In addition, express server must serve front end assets, such as index.html and evercookie.js as well.

var express = require('express');
var evercookie = require('evercookie');
const cookieParser = require('cookie-parser')

var app = express();
app.use(cookieParser());
app.use(evercookie.backend());
app.use(express.cookieParser());
app.use(express.static(__dirname + '/public')); // be careful, you may want to use path.join instead!

Settings

Customized settings can be used, but up to this moment, it makes no sense to change the dafault one, as all these values are hardcoded in (frontend) evercookie.js.

//...
app.use(evercookie.backend({
  pngCookieName: 'evercookie_png',
  etagCookieName: 'evercookie_etag',
  cacheCookieName: 'evercookie_cache',
  pngPath: '/evercookie_png.php',
  etagPath: '/evercookie_etag.php',
  cachePath: '/evercookie_cache.php'
}));
//...

Contributing

Acknowledgement

More Repositories

1

flutter_ssd_mobilenet

TBD
Dart
41
star
2

flutter-plugin-protobuf

Dart
29
star
3

flutter-ffi-samples

Dart
25
star
4

dart-websocket

Dart
20
star
5

nodejs-mongodb-redis-docker

This creates an image which contains an environment for NodeJS app ecosystem
Shell
10
star
6

android_flutter_host

Kotlin
9
star
7

flutter-form-autofill

Dart
6
star
8

fluttery_dash

Port of Flappy Bird, in Flutter
Dart
6
star
9

go-evercookie

This is a golang kind-of-middleware for evercookie.
Go
5
star
10

SKHReservationSystem

Python
3
star
11

SKHPoll

Python
2
star
12

generator

Generator is an experimental implementation of (pythonic) generator functions to be used in ECMAScript as specified in in ECMA-262, 3rd edition, i.e. JavaScript that every browser understands. Keywords: yield, generator, iterator, pythonic, javascript, ECMA-262, ECMAScript, KJS, Rhino, SpiderMonkey, V8, WebKit, Carakan, Chakra. Fork from https://bitbucket.org/balpha/lyfe/overview
JavaScript
2
star
13

angular-l10n

Support l10n (localization, i.e. string translation) for angular.js modules with directive `trans`. Support multi locale id and plurals
JavaScript
2
star
14

mgo

Git mirror of http://labix.org/mgo
Go
1
star
15

webpack5-is-slow-example

And example of NexJS 11 using webpack 5 being low with 10k files
JavaScript
1
star
16

icu-flutter

Dart
1
star
17

gitlabci-runner-nodejs-docker

nodejs npm bower grunt-cli redis mongodb
Shell
1
star
18

truongsinh.github.com

My Personal Website
JavaScript
1
star
19

nodejs-docker

This creates an Ubuntu derived base image that installs a recent version of Node.js. As of Dec 12, 2013, Node.js version is 0.10.23.
Shell
1
star
20

flutter-plugins-coverage-data

JavaScript
1
star