Fix missing forward slash in Actor id

This was making Mastodon fail to recognise the response (due possibly
due to the mismatch with the href in the WebFinger response).
parent 9856dbbe
......@@ -18,7 +18,7 @@ const channels = require('./channels')
const app = express(feathers())
// Hardcoded LocalTunnel URL for testing federation.
const localDomain = 'iiuoizjrsz.localtunnel.me'
const localDomain = 'avgrtijmup.localtunnel.me'
// Load app configuration
app.configure(configuration())
......@@ -31,19 +31,19 @@ app.use(express.urlencoded({ extended: true }))
app.use(favicon(path.join(app.get('public'), 'favicon.ico')))
app.use('/.well-known/webfinger', function (req, res, next) {
console.log('Web finger triggered.')
console.log(req.query)
console.log(`WebFinger request received for resource: ${req.query.resource}`)
res.set('Content-Type', 'application/jrd+json; charset=utf-8')
res.send(JSON.parse(`{
"subject": "person@${localDomain}",
"links": [{
"rel": "self",
"type": "application/ld+json; profile='https://www.w3.org/ns/activitystreams'",
"href": "https://${localDomain}/"
}]
}`)
)
const response = JSON.parse(`{
"subject": "acct:person@${localDomain}",
"links": [{
"rel": "self",
"type": "application/ld+json; profile='https://www.w3.org/ns/activitystreams'",
"href": "https://${localDomain}/"
}]
}`)
console.log(response)
res.send(response)
})
app.use('/inbox', function (req, res, next) {
......@@ -91,7 +91,7 @@ app.use('/', function (req, res, next) {
}
],
"type": "Person",
"id": "https://${localDomain}",
"id": "https://${localDomain}/",
"following": "https://${localDomain}/following",
"followers": "https://${localDomain}/followers",
"inbox": "https://${localDomain}/inbox",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment