This repository was archived by the owner on Apr 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathproxy.conf
More file actions
119 lines (103 loc) · 4.11 KB
/
proxy.conf
File metadata and controls
119 lines (103 loc) · 4.11 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
# The IPFS Gateway Configuration. For a list of public gateways,
# see https://ipfs.github.io/public-gateway-checker/
"ipfs": {
# Mandatory config. This is the gateway the proxy will first
# attempt to connect to.
"primary": {
"protocol": "https"
"host": "cloudflare-ipfs.com"
"port": 443
"path": "/ipfs"
},
# Optional fallback gateway. If configured, the proxy will
# use this gateway in case it is unable to fetch content from
# the primary gateway.
"fallback": {
"protocol": "https"
"host": "ipfs.io"
"port": 443
"path": "/ipfs"
}
}
# Network address to bind the server to,
bind_address: "0.0.0.0"
# Port to listen on
"port": 3000
"cors": {
"origin": "*"
}
# The default number of workers. This is application wide
"workers": 16,
# Exposes the prometheus metrics endpoint
"metrics_enabled": false
# Maximum image size the proxy attempt to fetch in bytes.
# Omit this entry if want to support any size imageas
"max_document_size": 26214400
# Time out in seconds for request,response and connecting to a url
"timeout": 100
# Optional useragent header value to be sent when fetching content.
# Commenting out the config means no useragent header will be set in
# the outgoing request. This may lead to some destination servers
# rejecting the request.
"client_useragent": "ImageProxy/1.0"
"security" : {
# Api access keys. Random ones provided below for testing, replace with your
# list. Note that if metrics is enabled, key usage stats will be displayed
# on the metrics endpoint. While the key itself will not be exposed, names
# will be. Pick names appropriately.
"api_keys": [
{ "name": "test_key_1", "key": "134472c4dd9118dbff1ed4e5fc7f1d056a0d690c9b6cc47c5c2453a011f57127" },
{ "name": "test_key_2", "key": "4901ef6e7a8baea9d10ad4997cbfbc0b7fa65c7816c0279d20bd745626a96690" },
{ "name": "test_key_3", "key": "e67b309d4587e57e93070ba49e5d33aaa09a9e6da4af9654f0708df6c738aabd" }
]
}
"moderation": {
# Moderation provider, Only AWS is supported
"provider": "Aws",
# The moderation labels that will trigger content being blocked.
# `*` indicates that any label will trigger a block.
# Not supported yet.
"labels": [ "*" ],
# Aws specific configuration
"aws": {
"region": "us-east-1"
}
}
# Database configuration
"database" : {
# Change to `localhost` for testing. See `docker/standalone-db.yml`
# for a postgres instance for development.
"host": "database",
"port": 5432,
"username": "imgproxy",
"password": "super_long_password_change_me!",
"db": "imgproxy",
# Maximum connections to the database that the pool can have
"pool_max_connections": 64,
# Minimum number of connections to the database that should be idle
"pool_idle_connections": 16,
# Connection timeout in seconds
"pool_connection_timeout": 30
# Optional SSL mode. If not set, will default to `prefer`.
# Other values as supported by tokio-postgres are `require`, `disable`.
# Note that `require` here is equivalent to `verify-full` elsewhere.
#"ssl_mode": "require",
# Optional CA certificate path for use with the above `ssl_mode` parameter
#"ca_cert": "/opt/imageproxy/ca.crt"
}
# Cache configuration
"cache_config": {
# Options are MemoryBoundedLruCache, DiskCache, None
"cache_type": "None",
"memory_cache_config": {
# Size of the cache in megabytes.
# Note that actual memory consumption will be slightly higher
# than specified.
"max_cache_size_mb": 1024
}
"disk_cache_config": {
"cache_path" : "/tmp/image_proxy"
}
}
}