Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Kévin Berthommier bertho-zero

🏠
Working from home
View GitHub Profile
View socketAuth.js
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,
View node-proxy.js
'use strict';
var http = require('http');
var net = require('net');
/*
* Usage : node node-proxy.js [-d] [-p 5555]
*/
var debugging = 0;