mirror of
				https://github.com/turbomaster95/coderrrrr.git
				synced 2025-10-24 20:01:38 +00:00 
			
		
		
		
	fixed?
This commit is contained in:
		
							parent
							
								
									6a360258b2
								
							
						
					
					
						commit
						bd88cd50b7
					
				| @ -3,38 +3,54 @@ import type { VercelRequest, VercelResponse } from '@vercel/node'; | |||||||
| export default async function (req: VercelRequest, res: VercelResponse) { | export default async function (req: VercelRequest, res: VercelResponse) { | ||||||
|   const { headers } = req; |   const { headers } = req; | ||||||
| 
 | 
 | ||||||
|   if ("accept" in headers) { |   if (headers.accept && headers.accept.includes("text/html")) { | ||||||
|     const accept = headers["accept"]; |     res.redirect(302, "https://coderrrrr.site/"); | ||||||
|     if (accept != null && accept.split(",").indexOf("text/html") > -1) { |     return; | ||||||
|       return res.redirect(302, "https://coderrrrr.site/").end(); |  | ||||||
|     } |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   res.statusCode = 200; |   res.status(200).setHeader("Content-Type", "application/activity+json").json({ | ||||||
|   res.setHeader("Content-Type", `application/activity+json`); |  | ||||||
|   res.json({ |  | ||||||
|     "@context": ["https://www.w3.org/ns/activitystreams", { "@language": "en-US" }], |     "@context": ["https://www.w3.org/ns/activitystreams", { "@language": "en-US" }], | ||||||
|     "type": "Person", |     "type": "Person", | ||||||
|     "id": "https://coderrrrr.site/coder", |     "id": "https://coderrrrr.site/coder", | ||||||
|     "outbox": "https://coderrrrr.site/outbox", |     "outbox": "https://coderrrrr.site/api/activitypub/outbox", | ||||||
|     "following": "https://coderrrrr.site/following", |     "following": "https://coderrrrr.site/api/activitypub/following", | ||||||
|     "followers": "https://coderrrrr.site/followers", |     "followers": "https://coderrrrr.site/api/activitypub/followers", | ||||||
|     "sharedInbox": "https://coderrrrr.site/sharedInbox" |     "sharedInbox": "https://coderrrrr.site/api/activitypub/sharedInbox", | ||||||
|     "inbox": "https://coderrrrr.site/inbox", |     "inbox": "https://coderrrrr.site/api/activitypub/inbox", | ||||||
|     "preferredUsername": "coder", |     "preferredUsername": "coder", | ||||||
|     "name": "Deva Midhun's blog", |     "name": "Deva Midhun's blog", | ||||||
|     "summary": "", |     "summary": "Software developer & self-hosting enthusiast.", | ||||||
|     "icon": { |     "icon": { | ||||||
|       "type": "Image", |       "type": "Image", | ||||||
|       "mediaType": "image/png", |       "mediaType": "image/png", | ||||||
|       "url": "https://i.ibb.co/N6J5b8WS/download20250102015611.png" |       "url": "https://i.ibb.co/N6J5b8WS/download20250102015611.png" | ||||||
|     }, |     }, | ||||||
|  |     "url": [ | ||||||
|  |       { | ||||||
|  |         "type": "Link", | ||||||
|  |         "mediaType": "text/html", | ||||||
|  |         "href": "https://coderrrrr.site", | ||||||
|  |         "name": "Website" | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         "type": "Link", | ||||||
|  |         "mediaType": "text/html", | ||||||
|  |         "href": "https://github.com/BomberFish", | ||||||
|  |         "name": "GitHub" | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         "type": "Link", | ||||||
|  |         "mediaType": "text/html", | ||||||
|  |         "href": "https://mastodon.social/@coder", | ||||||
|  |         "name": "Mastodon" | ||||||
|  |       } | ||||||
|  |     ], | ||||||
|     "publicKey": { |     "publicKey": { | ||||||
|       "@context": "https://w3id.org/security/v1", |       "@context": "https://w3id.org/security/v1", | ||||||
|       "@type": "Key", |       "@type": "Key", | ||||||
|       "id": "https://coderrrrr.site/coder#main-key", |       "id": "https://coderrrrr.site/coder#main-key", | ||||||
|       "owner": "https://coderrrrr.site/coder", |       "owner": "https://coderrrrr.site/coder", | ||||||
|       "publicKeyPem": process.env.ACTIVITYPUB_PUBLIC_KEY |       "publicKeyPem": process.env.ACTIVITYPUB_PUBLIC_KEY || "MISSING_PUBLIC_KEY" | ||||||
|     } |     } | ||||||
|   }); |   }); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user