-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.ts
More file actions
32 lines (29 loc) · 905 Bytes
/
config.ts
File metadata and controls
32 lines (29 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
export const sessionOpts = (() => {
const { NODE_ENV, SESSION_PASSWORD, SESSION_COOKIE_NAME } = (
process.env
)
return ({
cookieName: (
SESSION_COOKIE_NAME ?? '𝔐𝔦̈𝔪𝔦𝔰-default'
),
password: SESSION_PASSWORD ?? 'This is a password.',
cookieOptions: {
secure: NODE_ENV === "production",
},
})
})()
export const ipfsLinkPattern = (
process.env.NEXT_PUBLIC_IPFS_LINK_PATTERN
?? 'https://{v1cid}.ipfs.dweb.link/{path}'
?? 'https://ipfs.io/ipfs/{cid}/{path}'
)
export const ipfsLimitingDelay = (
process.env.NEXT_PUBLIC_IPFS_LIMITING_DELAY
?? 60 * 1000 / 75 // 75 per minute (< 100 / min which fails intermittently)
)
export const gwPatternKey = 'Mïmis-Gateway-Pattern'
export const limitingDelayKey = 'Mïmis-Gateway-Limiting-Delay'
export const ipfsAPIURL = (
process.env.NEXT_PUBLIC_IPFS_API_URL
?? 'http://localhost:5001/api/v0'
)