Add needed env var PRIVATE_KEY_PASSPHRASE + fix WebFinger test

This commit is contained in:
Armin 2019-03-25 13:15:37 +01:00
parent 30fc07e16e
commit 53a2440e3c
3 changed files with 2 additions and 3 deletions

View File

@ -22,6 +22,7 @@ let activityPub = null
export { activityPub }
export default class ActivityPub {
constructor (activityPubEndpointUri, internalGraphQlUri) {
this.endpoint = activityPubEndpointUri
this.dataSource = new NitroDataSource(internalGraphQlUri)
@ -56,7 +57,6 @@ export default class ActivityPub {
}
}, async (err, response, toActorObject) => {
if (err) return reject(err)
debug(`name = ${toActorName}@${this.host}`)
// save shared inbox
toActorObject = JSON.parse(toActorObject)
await this.dataSource.addSharedInboxEndpoint(toActorObject.endpoints.sharedInbox)

View File

@ -19,7 +19,6 @@ export function extractIdFromActivityId (uri) {
return splitted[splitted.indexOf('status') + 1]
}
export function constructIdFromName (name, fromDomain = activityPub.endpoint) {
return `${fromDomain}/activitypub/users/${name}`
}

View File

@ -13,7 +13,7 @@ import decode from './jwt/decode'
dotenv.config()
// check env and warn
const requiredEnvVars = ['MAPBOX_TOKEN', 'JWT_SECRET']
const requiredEnvVars = ['MAPBOX_TOKEN', 'JWT_SECRET', 'PRIVATE_KEY_PASSPHRASE']
requiredEnvVars.forEach(env => {
if (!process.env[env]) {
throw new Error(`ERROR: "${env}" env variable is missing.`)