Add User-Agent header (#2602)
This commit is contained in:
@ -27,6 +27,7 @@ export default (user: ILocalUser, url: string, object: any) => new Promise((reso
|
||||
method: 'POST',
|
||||
path: pathname + search,
|
||||
headers: {
|
||||
'User-Agent': config.user_agent,
|
||||
'Content-Type': 'application/activity+json',
|
||||
'Digest': `SHA-256=${hash}`
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as request from 'request-promise-native';
|
||||
import * as debug from 'debug';
|
||||
import { IObject } from './type';
|
||||
//import config from '../../config';
|
||||
import config from '../../config';
|
||||
|
||||
const log = debug('misskey:activitypub:resolver');
|
||||
|
||||
@ -51,6 +51,7 @@ export default class Resolver {
|
||||
const object = await request({
|
||||
url: value,
|
||||
headers: {
|
||||
'User-Agent': config.user_agent,
|
||||
Accept: 'application/activity+json, application/ld+json'
|
||||
},
|
||||
json: true
|
||||
|
Reference in New Issue
Block a user