Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nk23x/f89b852212066cbd6eb96630a2dd4053 to your computer and use it in GitHub Desktop.
Save nk23x/f89b852212066cbd6eb96630a2dd4053 to your computer and use it in GitHub Desktop.
sloppy static webfinger for apache
# www/.htaccess
RewriteRule ^[.]well-known/webfinger.*$ /profile/me [L]
# www/profile/.htaccess
Header set Content-Type: application/jrd+json
Header set Access-Control-Allow-Origin: "*"
# www/profile/me
{
"subject": "acct:dsandler@dsandler.org",
"aliases": [
"https://mastodon.social/@dsandler"
],
"links": [
{
"rel": "http://webfinger.net/rel/avatar",
"href": "https://dsandler.org/avatar/1bit.png"
},
{
"rel": "http://webfinger.net/rel/profile-page",
"type": "text/html",
"href": "https://mastodon.social/@dsandler"
},
{
"rel": "self",
"type": "application/activity+json",
"href": "https://mastodon.social/@dsandler"
},
{
"rel": "http://ostatus.org/schema/1.0/subscribe",
"template": "https://mastodon.social/authorize_interaction?uri={uri}"
},
{
"rel": "me",
"href": "https://dsandler.org/"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment