Requests over HTTPS

8TML > Reference > Publishing API

Over HTTPS, a request carries the key itself and no challenge or signature:

Authorization: Bearer 3f2a9c...  (the 64-digit key)
  • The body is the content alone: Content-Length is SIZE.
  • The endpoint accepts a key this way only on a connection that arrived over HTTPS. If a key arrives over plain HTTP, the endpoint refuses the request with insecure-key, and its message tells the user that this is unsafe: anyone on the way may have read the key. The endpoint doesn’t revoke the key by itself; whether to replace it is the owner’s choice.
  • Command-line tools on modern computers use this route.

Through a proxy

A machine that can’t do HTTPS sends the request to an HTTPS proxy on its own network, which forwards it over HTTPS:

POST https://example.com/publish?op=put&id=anna-1&name=news.8tml&size=1874 HTTP/1.0
Host: example.com
Authorization: Bearer 3f2a9c...
Content-Length: 1874

(1874 bytes of news.8tml)

The machine needs no signing code this way. The leg between the machine and the proxy is plain HTTP, though, so the key can be read on the local network: use this route only on a network you trust.