unoffical wafrn mirror
wafrn.net
atproto
social-network
activitypub
1import { Request, Response, NextFunction } from 'express'
2import { logger } from './logger.js'
3
4export default function overrideContentType(req: Request, res: Response, next: NextFunction) {
5 const UrlPath = req.path
6 if (UrlPath.startsWith('/fediverse')) {
7 req.headers['orig-content-type'] = req.headers['content-type']
8 req.headers['content-type'] = 'application/json;charset=UTF-8'
9 }
10 next()
11}