mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-25 17:10:43 +00:00
fix: OAuthのContent-Typeを正しく判定するように
This commit is contained in:
parent
810faa8e5d
commit
3fb80bc9b4
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue