this post was submitted on 15 Dec 2021
3 points (100.0% liked)

ActivityPub

674 readers
5 users here now

This is a community dedicated to discussing technical details related to ActivityPub.
We welcome developers familiar with the protocol!

https://activitypub.rocks/
https://www.w3.org/TR/activitypub/

Other ActivityPub communities on Lemmy

founded 5 years ago
MODERATORS
 

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.

top 2 comments
sorted by: hot top controversial new old
[โ€“] dessalines@lemmy.ml 3 points 2 years ago (1 children)

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.
[โ€“] Sal@mander.xyz 2 points 2 years ago

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.