description | Simple webmention endpoint |
owner | Vanitas Gloam |
last change | Sun, 28 Apr 2024 12:41:55 +0000 (14:41 +0200) |
URL | https://git.gloam.place/git/webmnt.git |
webmnt (all lowercase) is an easy to set up Webmention endpoint for your website to receive IndieWeb responses with.
It's very much a hacked together work in progress but can be used if you are fine with that.
To install this on your server, simply build the binary with go build
and copy it somewhere on your server to start it
as a service with your init system of choice.
Configuration is detailed in the next section.
For ease of use, all dependencies are vendored in the vendor
folder.
The following dependencies are in use:
webmnt takes the path to your config file as an argument.
./webmnt config.json
{
"blogHost": "localhost",
"outdir": "/tmp",
"listenAddr": "127.0.0.1:8080",
"maxLength": 200,
"blockList": [
"evil.example.com"
]
}
The options do the following:
The server offers the receiver endpoint under the path /webmention
using the source
and target
values that make
up a mention to validate the response using the following criteria:
target
and source
are valid URLS.source
is not on the blocklist.target
is on the same domain as the blogHost variable.target
is a page on our website and is the canonical URL for that page.source
exists.source
has the necessary markup to form a response.source
is the canonical URL of the page.After these steps of validation, the reply will be saved in a file in the folder set in outdir.
Alternatively: If source
returns HTTP 410 Gone, the response will get deleted from its file if it exists.
The name of the file is made up of your domain name and the subpath of the target, with slashes and dots replaced by underscores.
If a mention is sent multiple times it will be saved once, or if changes are detected since the previous send it will get updated.
The format in which responses are saved is as JSON objects separated by newlines meant to be read and processed further by additional software.
webmnt's code is under the GNU Affero General Public License v3.0 license.
The vendored modules in the vendor
directory are under their original licenses.
2024-04-28 | Vanitas Gloam | Close http body main | commit | commitdiff | tree | snapshot |
2024-04-26 | Vanitas Gloam | Add/Fix response types | commit | commitdiff | tree | snapshot |
2024-04-24 | Vanitas Gloam | Readme and license | commit | commitdiff | tree | snapshot |
2024-04-24 | Vanitas Gloam | Make MaxLength configurable | commit | commitdiff | tree | snapshot |
2024-04-24 | Vanitas Gloam | Escape dots from subpaths as well. | commit | commitdiff | tree | snapshot |
2024-04-24 | Vanitas Gloam | Hide blocked status | commit | commitdiff | tree | snapshot |
2024-04-24 | Vanitas Gloam | Simpler outfile | commit | commitdiff | tree | snapshot |
2024-04-23 | Vanitas Gloam | Add DEL/UPDATE plus validate target canonical url | commit | commitdiff | tree | snapshot |
2024-04-22 | Vanitas Gloam | Add likes | commit | commitdiff | tree | snapshot |
2024-04-21 | Vanitas Gloam | First deployed version | commit | commitdiff | tree | snapshot |
2024-04-20 | Vanitas Gloam | Initial commit | commit | commitdiff | tree | snapshot |
2 weeks ago | main | shortlog | log | tree |