News for hackers. Stuff that matters.
Re:Datasette’s new JSON write API: The first alpha of Datase... by simonw on Friday December 02, 2022 @08:32PM (#33839345)
I like that: I can have a thing where you can provide "localhost" but can also provide other host names and IPs too.
Re:Datasette’s new JSON write API: The first alpha of Datase... by vorpalhex on Friday December 02, 2022 @11:45PM (#33840688)
That approach also makes things more docker friendly.
Re:Datasette’s new JSON write API: The first alpha of Datase... by tlarkworthy on Saturday December 03, 2022 @02:17AM (#33841443)
Unfortunately the host header is spoofable
Re:Datasette’s new JSON write API: The first alpha of Datase... by simonw on Saturday December 03, 2022 @02:25AM (#33841488)
You mean the HTTP host header?

Yeah that's a good call: I need to do these checks only based on IP.

I could allow users to enter host names which I would resolve to the IP before checking though, which matches how networking is used in things like Kubernetes.