Fix(beckend): html content-type detection on signedGet (#14424)
* fix(backend): contenttype detection of html in signedGet * code style * fix by review
This commit is contained in:
		
							parent
							
								
									129af06198
								
							
						
					
					
						commit
						bf8c42eecd
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -204,8 +204,8 @@ export class ApRequestService {
 | 
			
		|||
 | 
			
		||||
		//#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき
 | 
			
		||||
		const contentType = res.headers.get('content-type');
 | 
			
		||||
		
 | 
			
		||||
		if ((contentType === 'text/html' || contentType?.startsWith('text/html;')) && _followAlternate === true) {
 | 
			
		||||
 | 
			
		||||
		if ((contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html' && _followAlternate === true) {
 | 
			
		||||
			const html = await res.text();
 | 
			
		||||
			const window = new Window();
 | 
			
		||||
			const document = window.document;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue