-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfig-sample.toml
48 lines (43 loc) · 1.58 KB
/
config-sample.toml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#Possible values -- debug, info, warn, error
log_level = "warn"
#port for the server to listen on
port = 3030
#CPU Threads for actix
workers = 8
#timeout when contacting listed origins
req_timeout = 360
#Limit response size from your origins
max_body_size_bytes = 200000000 # 200 MB
#For load balancer liveness Probe
health_endpoint = "/health"
#User agent should be <name>/<version>
user_agent = "imgopt/0.2.0"
#use full path if possible
storage_path = "storage"
#Limit which width scaling options are available (optional)
allowed_sizes = [ 50, 100, 200, 400, 500, 600, 800, 700, 900, 1000, 1100, 1200, 1300, 1400, 1500 ]
#max age header for twitter (in seconds) (optional)
twitter.cache.max_age = 3600
#Set to true will enable the query parameter ?url= to cache and process an asset found in the provided endpoint
#Ex: localhost:3030?url=https://yourdomain.com/testimage.png&width=100
allow_any_origin=true
url_deny_list=["https://google.com/search", "http://localhost", "https://example.com/", "http://127.0.0.1", "https://arweave.net/000000000000000000000000000000000000000", "https://arweave.net/%20#"]
#Smol kv https://github.com/mpwsh/smol-kv
kvstore_uri = "http://127.0.0.1:5050"
#Number of retries when downloading an asset
max_retries = 5
#origins
[[origins]]
name = "ipfs"
endpoint = "https://ipfs.io/ipfs"
#max age header for media files (Optional, default 31536000)
cache.max_age = 31536000
[[origins]]
name = "arweave"
endpoint = "https://arweave.net"
cache.max_age = 31536000
#Continue adding origins ..
#[[origins]]
#name = "service-name"
#endpoint = "https://service-url"
#cache.max_age = 31536000