Only accept HTML <link rel="alternate">
on success
This commit is contained in:
parent
bc02b4ae1f
commit
6ea48be84a
@ -207,7 +207,12 @@ export class ApRequestService {
|
||||
//#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき
|
||||
const contentType = res.headers.get('content-type');
|
||||
|
||||
if ((contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html' && _followAlternate === true) {
|
||||
if (
|
||||
res.status >= 200
|
||||
&& res.status <= 299
|
||||
&& (contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html'
|
||||
&& _followAlternate === true
|
||||
) {
|
||||
const html = await res.text();
|
||||
const window = new Window({
|
||||
settings: {
|
||||
|
Loading…
Reference in New Issue
Block a user