summaryrefslogtreecommitdiff
path: root/src/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api')
-rw-r--r--src/server/api/endpoints/users/recommendation.ts28
-rw-r--r--src/server/api/service/github.ts1
2 files changed, 14 insertions, 15 deletions
diff --git a/src/server/api/endpoints/users/recommendation.ts b/src/server/api/endpoints/users/recommendation.ts
index f54326b566..df85343f0f 100644
--- a/src/server/api/endpoints/users/recommendation.ts
+++ b/src/server/api/endpoints/users/recommendation.ts
@@ -30,22 +30,20 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
.replace('{{limit}}', limit)
.replace('{{offset}}', offset);
- request(
- {
- url: url,
- timeout: timeout,
- json: true,
- followRedirect: true,
- followAllRedirects: true
- },
- (error: any, response: any, body: any) => {
- if (!error && response.statusCode == 200) {
- res(body);
- } else {
- res([]);
- }
+ request({
+ url: url,
+ proxy: config.proxy,
+ timeout: timeout,
+ json: true,
+ followRedirect: true,
+ followAllRedirects: true
+ }, (error: any, response: any, body: any) => {
+ if (!error && response.statusCode == 200) {
+ res(body);
+ } else {
+ res([]);
}
- );
+ });
} else {
// Get 'limit' parameter
const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit);
diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts
index c8d588eaaf..ac18cf90ae 100644
--- a/src/server/api/service/github.ts
+++ b/src/server/api/service/github.ts
@@ -63,6 +63,7 @@ handler.on('status', event => {
// Fetch parent status
request({
url: `${parent.url}/statuses`,
+ proxy: config.proxy,
headers: {
'User-Agent': 'misskey'
}