WIP: Secure mode #31

Closed
norm wants to merge 21 commits from (deleted):feat/secure-fetch into main
6 changed files with 3 additions and 11 deletions
Showing only changes of commit 55b2aebec4 - Show all commits

View file

@ -120,9 +120,6 @@ redis:
# Proxy remote files (default: false)
#proxyRemoteFiles: true
# Sign to ActivityPub GET request (default: false)
#signToActivityPubGet: true
#allowedPrivateNetworks: [
# '127.0.0.1/32'
#]

View file

@ -154,9 +154,6 @@ id: "aid"
# Media Proxy
#mediaProxy: https://example.com/proxy
# Sign to ActivityPub GET request (default: false)
#signToActivityPubGet: true
#allowedPrivateNetworks: [
# '127.0.0.1/32'
#]

View file

@ -776,7 +776,7 @@ emailNotConfiguredWarning: "Email address not set."
ratio: "Ratio"
secureMode: "Secure Mode (Authorized Fetch)"
instanceSecurity: "Instance Security"
secureModeInfo: "Requests from other instances must be signed, otherwise notes won't be returned. signToActivityPubGet must be set to true in the other instance's configuration file."
secureModeInfo: "Requests from other instances must be signed, otherwise notes won't be returned."
privateMode: "Private Mode"
privateModeInfo: "When enabled, only authorized instances may fetch notes. Hides all notes from public."
allowedInstances: "Allowed Instances"

View file

@ -778,7 +778,7 @@ emailNotConfiguredWarning: "メールアドレスの設定がされていませ
ratio: "比率"
secureMode: "セキュアモード (Authorized Fetch)"
instanceSecurity: "インスタンスのセキュリティー"
secureModeInfo: "他のインスタンスからリクエストするときに、証明を付けなければ返送しません。他のインスタンスの設定ファイルでsignToActivityPubGetはtrueにしてください。"
secureModeInfo: "他のインスタンスからリクエストするときに、証明を付けなければ返送しません。"
privateMode: "非公開モード"
privateModeInfo: "有効にして、許可されているインスタンスのみがリクエストできます。すべてのノートが公開に非表示にします。"
allowedInstances: "許可されたインスタンス"

View file

@ -63,8 +63,6 @@ export type Source = {
mediaProxy?: string;
proxyRemoteFiles?: boolean;
signToActivityPubGet?: boolean;
};
/**

View file

@ -76,7 +76,7 @@ export default class Resolver {
throw new Error('Instance is not allowed');
}
if (config.signToActivityPubGet && !this.user) {
if (!this.user) {
this.user = await getInstanceActor();
}