mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
fix: OAuthのContent-Typeを正しく判定するように
This commit is contained in:
@@ -142,7 +142,9 @@ async function discoverClientInformation(logger: Logger, httpRequestService: Htt
|
||||
redirectUris.push(...httpLinkHeader.parse(linkHeader).get('rel', 'redirect_uri').map(r => r.uri));
|
||||
}
|
||||
|
||||
if (res.headers.get('content-type')?.includes('application/json')) {
|
||||
const contentType = res.headers.get('content-type');
|
||||
const mediaType = contentType ? contentType.split(';')[0].trim() : null;
|
||||
if (mediaType === 'application/json') {
|
||||
// Client discovery via JSON document (11 July 2024 spec)
|
||||
// https://indieauth.spec.indieweb.org/#client-metadata
|
||||
// "Clients SHOULD have a JSON [RFC7159] document at their client_id URL containing
|
||||
|
||||
Reference in New Issue
Block a user