mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-27 09:35:09 +00:00
content type
This commit is contained in:
@@ -50,6 +50,13 @@ export class APServer extends Server {
|
||||
|
||||
this.app = app;
|
||||
|
||||
this.app.use("*", (req, res, next) => {
|
||||
res.setHeader(
|
||||
"Content-Type",
|
||||
"application/activity+json; charset=utf-8",
|
||||
);
|
||||
next();
|
||||
});
|
||||
this.app.use("/fed", api);
|
||||
this.app.get("/fed", (req, res) => {
|
||||
res.json({ ping: "pong" });
|
||||
|
||||
@@ -48,6 +48,7 @@ router.get(
|
||||
|
||||
const type = found instanceof Channel ? "channel" : "user";
|
||||
|
||||
res.setHeader("Content-Type", "application/jrd+json; charset=utf-8");
|
||||
return res.json({
|
||||
subject: `acct:${resourceId}@${webDomain}`, // mastodon always returns acct so might as well
|
||||
aliases: [`https://${webDomain}/fed/${type}/${resourceId}`],
|
||||
|
||||
Reference in New Issue
Block a user