Forked from dsandler/gist:1f94e95b9ea6cc7d5ec338c41e4b0bcd
Created
September 27, 2023 08:47
-
-
Save nk23x/f89b852212066cbd6eb96630a2dd4053 to your computer and use it in GitHub Desktop.
sloppy static webfinger for apache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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:[email protected]", | |
"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