Hacker Newsnew | past | comments | ask | show | jobs | submit | Ineentho's commentslogin

I'm curious on how you'd configure this. Is it common (and safe) to let a cdn cache private data for authenticated users?

Say Jira used electric, would you be able to put all tickets for a project behind a cdn cache key? You'd need a cdn that is able to run auth logic such as verifying a jwt to ensure you don't leak data to unauthorized users, right?


Yup, you can put an auth proxy in front of the CDN, for example using an edge worker.

See the auth guide: https://electric-sql.com/docs/guides/auth

Some CDNs also validate JWTs, so the CDN can be the proxy part of the Gatekeeper pattern (in the guide).


Another option too for scaling reads is just putting an nginx in your cluster.

Electric itself is quite scalable at reads too so for a SaaS use-case, you might not need any http proxy help.


Couldn't even that be abused? A link that's just a square character styled either black or white could look really similar to the demo.


Usually refreshing a couple of times works for me (even just waiting a few seconds between each attempt)


If process substitution doesn't work, shouldn't /dev/stdin work? I haven't tried it, but as long as b2 doesn't try to check the file size before uploading I don't see why it wouldn't work: b2 upload_file bucket /dev/stdin < file


I haven't heard about timm before, but it looks very similar to immer https://github.com/immerjs/immer, which is even recommended in the official React docs now


We also recommend using Immer with Redux [0], and it's used internally in our new Redux Toolkit package [1].

[0] https://redux.js.org/style-guide/style-guide#use-immer-for-w...

[1] https://redux-toolkit.js.org/


Nice, thanks to both of you for the tip. I always hated ImmutableJS's clunky API which is partly the reason why I switched from Redux to Mobx as the object assigning felt otherwise so icky. I have to check out if Immer is any better =).


I think the common way is to upload your public SSH key to ~/.ssh/authorized_keys and adding a host entry to ~/.SSH/config specifying the user


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: