I am trying to follow this ActivityPub tutorial.
I would like to get my server to respond with a static file when it gets a query for https://domain.com/.well_known/webfinger?resource=act:username@domain.com
Since it is not explained in the tutorial I suppose that this is a very basic thing to do, but I have never dealt with this type of query before. What is the simplest way achieve this? My server is using nginx to serve a basic static html at domain.com.
Don’t try to do too many of these things at once.
- First read the actix-web docs.
- Then get serving a static file working.
- Then figure out how to use query params and use them in your actix route.
- Then figure out how to route a top level
.well_known
to your actix route. You will need nginx or a web server to do this.
Aha! Ok, it was not obvious to me that I needed something in addition to nginx to route the query. Thank you a lot, I will do this.
A heads up to this SocialHub Guide for new ActivityPub implementers. It is a crowdsourced wiki, edited by members and it would be great if you could add improvements based on your own experiences.