Recognise matrix-media-repo URL preview agent
This commit is contained in:
		
							parent
							
								
									8eee70a52a
								
							
						
					
					
						commit
						bcc3bfc288
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -53,7 +53,7 @@ as.router.get("/log-in-with-matrix", defineEventHandler(async event => { | |||
| 	} | ||||
| 
 | ||||
| 	const userAgent = getRequestHeader(event, "User-Agent") | ||||
| 	if (userAgent?.match(/bot/)) throw createError({status: 400, data: "Sorry URL previewer, you can't have this URL."}) | ||||
| 	if (userAgent?.match(/bot|matrix/)) throw createError({status: 400, data: "Sorry URL previewer, you can't have this URL."}) | ||||
| 
 | ||||
| 	if (!validToken.has(token)) return sendRedirect(event, `${reg.ooye.bridge_origin}/log-in-with-matrix`, 302) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue