This commit is contained in:
syuilo 2018-04-05 17:52:46 +09:00
parent cf3216223d
commit f8bfec2963
5 changed files with 5 additions and 11 deletions

View File

@ -3,9 +3,7 @@ import * as express from 'express';
import { parseRequest } from 'http-signature'; import { parseRequest } from 'http-signature';
import { createHttp } from '../../queue'; import { createHttp } from '../../queue';
const app = express(); const app = express.Router();
app.disable('x-powered-by');
app.post('/@:user/inbox', bodyParser.json({ app.post('/@:user/inbox', bodyParser.json({
type() { type() {

View File

@ -6,8 +6,7 @@ import config from '../../config';
import Post from '../../models/post'; import Post from '../../models/post';
import withUser from './with-user'; import withUser from './with-user';
const app = express(); const app = express.Router();
app.disable('x-powered-by');
app.get('/@:user/outbox', withUser(username => { app.get('/@:user/outbox', withUser(username => {
return `${config.url}/@${username}/inbox`; return `${config.url}/@${username}/inbox`;

View File

@ -5,8 +5,7 @@ import parseAcct from '../../acct/parse';
import Post from '../../models/post'; import Post from '../../models/post';
import User from '../../models/user'; import User from '../../models/user';
const app = express(); const app = express.Router();
app.disable('x-powered-by');
app.get('/@:user/:post', async (req, res, next) => { app.get('/@:user/:post', async (req, res, next) => {
const accepted = req.accepts(['html', 'application/activity+json', 'application/ld+json']); const accepted = req.accepts(['html', 'application/activity+json', 'application/ld+json']);

View File

@ -4,8 +4,7 @@ import render from '../../remote/activitypub/renderer/key';
import config from '../../config'; import config from '../../config';
import withUser from './with-user'; import withUser from './with-user';
const app = express(); const app = express.Router();
app.disable('x-powered-by');
app.get('/@:user/publickey', withUser(username => { app.get('/@:user/publickey', withUser(username => {
return `${config.url}/@${username}/publickey`; return `${config.url}/@${username}/publickey`;

View File

@ -11,8 +11,7 @@ const respond = withUser(username => `${config.url}/@${username}`, (user, req, r
res.json(rendered); res.json(rendered);
}); });
const app = express(); const app = express.Router();
app.disable('x-powered-by');
app.get('/@:user', (req, res, next) => { app.get('/@:user', (req, res, next) => {
const accepted = req.accepts(['html', 'application/activity+json', 'application/ld+json']); const accepted = req.accepts(['html', 'application/activity+json', 'application/ld+json']);