SOS

Shane O'Sullivan's technical blog… really ties the room together

Archive for September, 2019

Gitme.me brings joy to your code reviews

Posted by Shane O'Sullivan on September 11, 2019

I recently shipped a fun Chrome extension called Gitmeme.  It brings joy to your code reviews on Github by making is easy and fun to add Gifs and memes to your comments.

Get it from https://gitme.me today!

Posted in Technical | Leave a Comment »

Firebase strips all request cookies

Posted by Shane O'Sullivan on September 11, 2019

A painfully wasteful discovery today was that, when you are using Firebase Functions to serve your code, it strips all cookies from the request object.  The only hack around this is to use a specially named cookie, “__session” and fit any data you need into that.

For example, in the browser

document.cookie = “__session=some_value”;

and on the server

import {parse} from “cookie-parse”;

exports.myFunction = functions.https.onRequest((req, res) => {
const cookie = req.headers.cookie;
const sessionValue = parse(cookie)[“__session”];
console.log(“Should be some_value”, sessionValue);
});

Posted in Cloud, Firebase, Technical | Leave a Comment »

 
%d bloggers like this: