Add User-Agent header (#2602)

This commit is contained in:
MeiMei
2018-09-04 17:44:21 +09:00
committed by syuilo
parent 921609cab1
commit 5b039a1bee
5 changed files with 12 additions and 2 deletions

View File

@ -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}`
}

View File

@ -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