diff --git a/blog/300-link-addendum.html b/blog/300-link-addendum.html new file mode 100644 index 0000000..02fa7b8 --- /dev/null +++ b/blog/300-link-addendum.html @@ -0,0 +1,53 @@ + + +
+ + +Still not the movie. Still a nerd.
+So let's figure out how to add the Link
header
+ for 300 Multiple Choices. As a reminder, here's
+ the spec:
++It is possible to communicate the list using a set of Link + header fields RFC5988, + each with a relationship of "alternate", though deployment is a + chicken-and-egg problem.
+
So based off some examples for the Link
header
+ in general on Mozilla's
+ docs, and for 300 Link
headers specifically on http.dev, this is how you
+ make the Link
headers for a 300:
+ Link: </relative/link/like/this>; rel="alternate" Link: <https://site-one.net/blah/blah/blah>; rel="alternate"
Unfortunately, there doesn't seem to be an option for
+ specifying a preferred choice in the Link
header.
+ So I'll just set mine to these:
+ Link: <https://git.askiiart.net/askiiart/askiiart-net>; rel="alternate" Link: <https://github.com/askiiart/askiiart.github.io>; rel="alternate"
And so here's the new nginx config:
+ location /.git {
+ add_header Location "https://git.askiiart.net/askiiart/askiiart-net";
+ add_header Link '<https://git.askiiart.net/askiiart/askiiart-net>; rel="alternate"; "';
+ add_header Link '<https://github.com/askiiart/askiiart.github.io>; rel="alternate"; "';
+ return 300 '<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></head><body><a href="https://git.askiiart.net/askiiart/askiiart-net">Self-hosted</a><br><a href="https://github.com/askiiart/askiiart-net">GitHub</a></body></html>';
+ }
+
+
+
+
+
diff --git a/blog/300-link-addendum.md b/blog/300-link-addendum.md
new file mode 100644
index 0000000..f29f231
--- /dev/null
+++ b/blog/300-link-addendum.md
@@ -0,0 +1,36 @@
+# 300 Addendum
+
+Still not the movie. Still a nerd.
+
+---
+
+So let's figure out how to add the `Link` header for 300 Multiple Choices. As a reminder, [here's the spec](https://httpwg.org/specs/rfc9110.html#status.300):
+
+> It is possible to communicate the list using a set of Link header fields *[RFC5988](https://httpwg.org/specs/rfc9110.html#RFC8288)*, each with a relationship of "alternate", though deployment is a chicken-and-egg problem.
+
+So based off some examples for the `Link` header in general on [Mozilla's docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link), and for 300 `Link` headers specifically [on http.dev](https://http.dev/300), this is how you make the `Link` headers for a 300:
+
+```txt
+Link: ; rel="alternate"
+Link: -It is possible to communicate the list using a set of Link - header fields RFC5988, + header fields RFC5988, each with a relationship of "alternate", though deployment is a chicken-and-egg problem.
I'll probably figure out the Link
header some
- other time and will add this later, at which point I'll post an
- addendum. Until then, bye I guess!
I'll probably figure out the Link
header
+ some other time and will add this later, at which point I'll
+ post an addendum. Until then, bye I guess!
Update: Link
addendum here!
Elsewhere in the Quora thread it says, in short, that Firefox diff --git a/blog/300.md b/blog/300.md index f669750..e31d45a 100644 --- a/blog/300.md +++ b/blog/300.md @@ -84,9 +84,11 @@ These still don't work, they just return my reverse proxy container's gateway's Turns out might be a standard way to do it! From [RFC 9110](https://httpwg.org/specs/rfc9110.html#status.300), again: -> It is possible to communicate the list using a set of Link header fields [RFC5988](https://httpwg.org/specs/rfc9110.html#RFC8288), each with a relationship of "alternate", though deployment is a chicken-and-egg problem. +> It is possible to communicate the list using a set of Link header fields *[RFC5988](https://httpwg.org/specs/rfc9110.html#RFC8288)*, each with a relationship of "alternate", though deployment is a chicken-and-egg problem. -I'll probably figure out the `Link` header some other time and will add this later, at which point I'll post an addendum. Until then, bye I guess! +~~I'll probably figure out the `Link` header some other time and will add this later, at which point I'll post an addendum. Until then, bye I guess!~~ + +Update: `Link` addendum [here](/blog/300-link-addendum.html)! ## Footnotes and stuff diff --git a/blog/feed.xml b/blog/feed.xml index db21c52..363d2e9 100644 --- a/blog/feed.xml +++ b/blog/feed.xml @@ -5,7 +5,7 @@