diff options
author | 2023-03-09 18:55:45 +0100 | |
---|---|---|
committer | 2023-03-09 17:55:45 +0000 | |
commit | a312238e7909c6451e608a91c326ad250dda875c (patch) | |
tree | 1395a27178a7ffd78486e3ddb00cd29dfce27cd8 /internal/api/util/negotiate.go | |
parent | [bug] Handle 410 on webfinger properly (#1601) (diff) | |
download | gotosocial-a312238e7909c6451e608a91c326ad250dda875c.tar.xz |
[feature] Provide .well-known/host-meta endpoint (#1604)
* [feature] Provide .well-known/host-meta endpoint
This adds the host-meta endpoint as Mastodon clients use this to
discover the API domain to use when the host and account domains aren't
the same.
* Address review comments
Diffstat (limited to 'internal/api/util/negotiate.go')
-rw-r--r-- | internal/api/util/negotiate.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/api/util/negotiate.go b/internal/api/util/negotiate.go index 3a5f21775..06a202815 100644 --- a/internal/api/util/negotiate.go +++ b/internal/api/util/negotiate.go @@ -58,6 +58,11 @@ var HTMLOrActivityPubHeaders = []MIME{ AppActivityLDJSON, } +var HostMetaHeaders = []MIME{ + AppXMLXRD, + AppXML, +} + // NegotiateAccept takes the *gin.Context from an incoming request, and a // slice of Offers, and performs content negotiation for the given request // with the given content-type offers. It will return a string representation |