File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ SECRET_KEY=secret_key # generate a secret key with `openssl rand -base64 32`
5
5
LOG_LEVEL = info
6
6
LOG_QUERY = false
7
7
BEHIND_PROXY = false
8
+ LISTEN_PORT = 3000 # if BEHIND_PROXY=true used as port for the server
9
+ # Setting ALLOW_PRIVATE_ADDRESS to true disables SSRF (Server-Side Request Forgery) protection
10
+ # Set to true to test in local network
11
+ # Will be replaced by list of allowed IPs once https://github.com/dahlia/fedify/issues/157
12
+ # is implemented.
13
+ ALLOW_PRIVATE_ADDRESS = false
8
14
REMOTE_ACTOR_FETCH_POSTS = 10
9
15
AWS_ACCESS_KEY_ID =
10
16
AWS_SECRET_ACCESS_KEY =
Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ if (getRedisUrl() == null) {
110
110
export const federation = createFederation < void > ( {
111
111
kv,
112
112
queue,
113
+ // biome-ignore lint/complexity/useLiteralKeys: tsc complains about this (TS4111)
114
+ allowPrivateAddress : process . env [ "ALLOW_PRIVATE_ADDRESS" ] === "true" ,
113
115
} ) ;
114
116
115
117
federation
Original file line number Diff line number Diff line change @@ -31,5 +31,9 @@ app.get("/favicon.png", async (c) => {
31
31
32
32
// biome-ignore lint/complexity/useLiteralKeys: tsc complains about this (TS4111)
33
33
const BEHIND_PROXY = process . env [ "BEHIND_PROXY" ] === "true" ;
34
+ // biome-ignore lint/complexity/useLiteralKeys: tsc complains about this (TS4111)
35
+ const HOLLO_PORT = Number . parseInt ( process . env [ "LISTEN_PORT" ] ?? "3000" , 10 ) ;
34
36
35
- export default BEHIND_PROXY ? { fetch : behindProxy ( app . fetch . bind ( app ) ) } : app ;
37
+ export default BEHIND_PROXY
38
+ ? { fetch : behindProxy ( app . fetch . bind ( app ) ) , port : HOLLO_PORT }
39
+ : app ;
You can’t perform that action at this time.
0 commit comments