Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: What startup/technology is on your 'to watch' list?. Parent comment
addEventListener('fetch', event => { event.respondWith(handleRequest(event.request)) }) async function handleRequest(request) { const cookie = request.headers.get('Cookie'); if (cookie && cookie.includes('foo=bar')) { return await fetch(request); } else { return new Response('You must log in before accessing this content'); } }
https://gist.github.com/stickfigure/af592b1ce7f888c5b8a4efbe...
There are no comments on this comment yet.
https://gist.github.com/stickfigure/af592b1ce7f888c5b8a4efbe...