Skip to content

Instantly share code, notes, and snippets.

View bertho-zero's full-sized avatar
🏠
Working from home

Kévin Berthommier bertho-zero

🏠
Working from home
View GitHub Profile
'use strict';
var http = require('http');
var net = require('net');
/*
* Usage : node node-proxy.js [-d] [-p 5555]
*/
var debugging = 0;
import { verifyJWT } from 'feathers-authentication/lib/utils';
export default function socketAuth(app) {
return (socket, next) => {
const { cookie } = socket.request.headers;
const cookies = cookie && cookie.split('; ')
.reduce((prev, nextCookie) => {
const [name, value] = nextCookie.split('=');
return {
...prev,