Fix actor

This commit is contained in:
Shadowfacts 2019-02-18 16:32:31 -05:00
parent 8fdff69cf3
commit aca5798721
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 2 additions and 2 deletions

View File

@ -1 +0,0 @@
{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"type":"Person","id":"https://shadowfacts.net/ap/actor","preferredUsername":"shadowfacts","name":"shadowfacts' blog","icon":{"type":"Image","mediaType":"image/png","url":"https://shadowfacts.net/shadowfacts.png"},"inbox":"https://shadowfacts.net/ap/inbox","publicKey":{"id":"https://shadowfacts.net/ap/actor#main-key","owner":"https://shadowfacts.net/ap/actor","publicKeyPem":"\n-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsePhOEq6EqqgGe+5vKa\nti8cnvLoP3eJDTHENxX4M9epMIeo48cI214wkAERoNufZLtYeGOHO6YJcVydVSYN\nUd4lQxgaPwAlh0DB0BUrXR1yfcSAhHS86XBSUq86O3fY5V+vEdZiN5PfUCG5rg5t\n5V/TrcbVQngXqDmwVZ/OcJ+5vUo+B62Mul7EmiNkZHKzp1VZGVtZ6nZ/4TxsdeSN\nXT8Vb0f/GJQOQLzW6dV0CBupts6x7o+9oRiYiAH+cXLFyQdTQ+1TrqMSMscdfX9I\nKos5Ih7oKdj6wQt0pDEOGx090c9JzQC25RzxRk7jc1Jt1UzDi/a1U/BbucxIvPr3\nPQIDAQAB\n-----END PUBLIC KEY-----\n"}}

View File

@ -30,7 +30,8 @@ app.get("/ap", (req, res) => {
app.get("/ap/actor", (req, res) => {
if (req.accepts(["application/activity+json", "application/ld+json"])) {
res.sendFile("actor.json");
res.type("application/activity+json");
res.end(`{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"type":"Person","id":"https://shadowfacts.net/ap/actor","preferredUsername":"shadowfacts","name":"shadowfacts' blog","icon":{"type":"Image","mediaType":"image/png","url":"https://shadowfacts.net/shadowfacts.png"},"inbox":"https://shadowfacts.net/ap/inbox","publicKey":{"id":"https://shadowfacts.net/ap/actor#main-key","owner":"https://shadowfacts.net/ap/actor","publicKeyPem":"\\n-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsePhOEq6EqqgGe+5vKa\\nti8cnvLoP3eJDTHENxX4M9epMIeo48cI214wkAERoNufZLtYeGOHO6YJcVydVSYN\\nUd4lQxgaPwAlh0DB0BUrXR1yfcSAhHS86XBSUq86O3fY5V+vEdZiN5PfUCG5rg5t\\n5V/TrcbVQngXqDmwVZ/OcJ+5vUo+B62Mul7EmiNkZHKzp1VZGVtZ6nZ/4TxsdeSN\\nXT8Vb0f/GJQOQLzW6dV0CBupts6x7o+9oRiYiAH+cXLFyQdTQ+1TrqMSMscdfX9I\\nKos5Ih7oKdj6wQt0pDEOGx090c9JzQC25RzxRk7jc1Jt1UzDi/a1U/BbucxIvPr3\\nPQIDAQAB\\n-----END PUBLIC KEY-----\\n"}}`);
} else {
res.redirect("/");
}