cross-posted from: https://indie-ver.se/post/20213
Hi again!
I am trying to improve the security for my website, but I am unsure of which paths federation and API traffic hits, and which paths should be exempt from e.g. Javascript challenges? Could somebody give me some insight into this?


Basically the only thing you want to present with a challenge is the paths/virtual hosts for the web frontends.
Anything
/api/v3/is client-to-server API (i.e. how your client talk to your instance) and needs to be obstruction-free. Otherwise, clients/apps won’t be able to use the API. Same for/pictrssince that proxies through Lemmy and is a de-facto API endpoint (even though it’s a separate component).Federation traffic also needs to be exempt, but it’s not based on routes but by the HTTP
Acceptrequest header and request method.Looking at the Nginx proxy config, there’s this mapping which tells Nginx how to route inbound requests:
nginx_internal.conf: https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx_internal.conf
This is very useful. Thanks!