Add a quick-and-dirty post about what happens
Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>
This commit is contained in:
parent
19d85eb7d8
commit
2a5b04d8d5
19
content/posts/2021-08-17-serving-blog-content-over-dns.md
Normal file
19
content/posts/2021-08-17-serving-blog-content-over-dns.md
Normal file
@ -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
|
@ -131,7 +131,7 @@ async function handleMarkdown(content)
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
readUrl("posts-2015-01-24-multiple-return-values-with-mockery-md");
|
readUrl("posts-2021-08-17-serving-blog-content-over-dns-md");
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div id="post"></div>
|
<div id="post"></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user