.well-known/ for Fediverse integration
I'm trying to follow the instructions here:
https://fed.brid.gy/docs#fediverse-enhanced
and am using Deploy and Fresh and not finding any good resources on how to do this. would love some tips or links. thanks!
4 Replies
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it seems like you're trying to integrate Fediverse functionality into a Deno Deploy project using Fresh.
If you're looking to serve files from a
.well-known/
directory, you would typically set up routing in your Fresh project to respond to requests for paths under that directory. Here's a general idea of what you might do, although please note that this advice is not based on the Deno documentation, and you should double-check the accuracy of this advice:
This is a very basic example and you would need to adjust it to fit your specific use case, including error handling and setting the correct MIME types in the response headers.
Since this is not directly from the Deno documentation, please make sure to refer to the Fresh documentation and Deno Deploy documentation for more accurate and detailed information on how to implement routing and staticfile serving in your application.
Hey @Adam Argyle! I'm sure there's a better way than this, but I'd do it by creating a middleware in
routes/_middleware.ts
like this:
It's just a simple little redirect handler that uses web standard URL Patterns to construct the redirect matching rules.ty for this, confirms my suspicions on implementations. i'll give a whirl soon and see if it passes. thanks for taking the time!