Etke.cc domain delegation on GitLab pages


Today I moved back my main homepage to GitLab Pages. It just makes it easier to maintain, as it”s just static files in the end.

Previously, using Caddy, I was using the following to redirect the Matrix .well-known endpoints of my server to the correct ones:

your-server.com {
    @matrixWellKnown path /.well-known/matrix/*
    header @matrixWellKnown Access-Control-Allow-Origin "*"
    redir @matrixWellKnown https://matrix.your-server.com{uri} 301
}
JSON

Doing the same on GitLab Pages is easy. For instance, my website resides in the src folder of the repository. For this, I would just have to create a new file src/_redirects filled with:

/.well-known/matrix/* https://matrix.your-server.com/.well-known/matrix/:splat 301
JSON

And done, looking at the federation tester, everything works as expected. That easy!


Fediverse reactions
Jae's Blog
Jae's Blog
@b@b.j4.lc

Jae’s blog, now federating properly!

120 posts
38 followers

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *