Fix actor
This commit is contained in:
parent
8fdff69cf3
commit
aca5798721
|
@ -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"}}
|
|
3
index.js
3
index.js
|
@ -30,7 +30,8 @@ app.get("/ap", (req, res) => {
|
||||||
|
|
||||||
app.get("/ap/actor", (req, res) => {
|
app.get("/ap/actor", (req, res) => {
|
||||||
if (req.accepts(["application/activity+json", "application/ld+json"])) {
|
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 {
|
} else {
|
||||||
res.redirect("/");
|
res.redirect("/");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue