From 2a5b04d8d5453d595742c620e71f42eb6cf76eaf Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Tue, 17 Aug 2021 01:24:03 +0200 Subject: [PATCH] Add a quick-and-dirty post about what happens Signed-off-by: Jacob Kiers --- ...021-08-17-serving-blog-content-over-dns.md | 19 +++++++++++++++++++ index.html | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 content/posts/2021-08-17-serving-blog-content-over-dns.md diff --git a/content/posts/2021-08-17-serving-blog-content-over-dns.md b/content/posts/2021-08-17-serving-blog-content-over-dns.md new file mode 100644 index 0000000..617ed87 --- /dev/null +++ b/content/posts/2021-08-17-serving-blog-content-over-dns.md @@ -0,0 +1,19 @@ ++++ +title = Serving blog content over DNS +date = 2021-08-15 +author = Jacob Kiers ++++ + +You might not be able to see it immediately, but the content of this page is verved over DNS. + +This works because of the new DNS-over-HTTP support, which, at least at Cloudflare, also has an API. + +That API is used to load the contents of this page, essentially like this: + +```js +fetch("https://cloudflare-dns.com/dns-query?ct=application/dns-json&type=TXT&name=post.hod.experiments.jacobkiers.net"); +``` + +Please see the [source code] for the details of how it works. + +[source code]: https://github.com/jacobkiers/html-over-dns \ No newline at end of file diff --git a/index.html b/index.html index 42499d1..e4138a6 100644 --- a/index.html +++ b/index.html @@ -131,7 +131,7 @@ async function handleMarkdown(content)