This repository has been archived by the owner on Mar 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.sample.toml
73 lines (58 loc) · 2.55 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
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
[log]
# Log level (5=panic, 4=fatal, 3=error, 2=warn, 1=info, 0=debug)
level = 1
[database]
# PostgreSQL connection URL, see
# https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters for
# more information
connectionURL = "postgres://postgres:password@localhost/whats_this?sslmode=disable"
# Bucket to serve objects from
objectBucket = "public"
[http]
# Enable transparent response compression (only when the client Accepts it)
compressResponse = false
# TCP address to listen to for HTTP requests
listenAddress = ":8080"
# Trust X-Forwarded-For header from proxy (used in metrics collection)
trustProxy = false
[metrics]
# Enable anonymized request recording (country code, hostname, object type,
# status code)
enable = false
# Elasticsearch URL to connect to for metrics, required if
# `metrics.enable == true`. See
# https://godoc.org/gopkg.in/olivere/elastic.v5/config#Parse for more
# information.
elasticURL = "http://elasticsearch:9200/cdn-origin_requests?shards=1&replicas=0"
# Enable metrics collection hostname whitelist. When this is enabled,
# metrics will only be collected for requests with a Host header matching a
# domain in the list below.
enableHostnameWhitelist = false
# Metrics collection hostname whitelist. Wildcards are supported at the
# beginning of each domain. It is recommended to rank this list by domain
# popularity at intervals to reduce match time.
#
# Since 0.4.0 `www.` prefixes will be stripped from all incoming `Host`
# headers, and don't need to be included in `metrics.hostnameWhitelist`.
hostnameWhitelist = [
"example.com",
"*.example.net",
"test.example.org"
]
# MaxMind GeoLite2 Country database location on disk. If omitted, no country
# code data will be collected. https://dev.maxmind.com/geoip/geoip2/geolite2
maxmindDBLocation = "/var/data/maxmind/GeoLite2-Country.mmdb"
[files]
# Storage location of the bucket on disk
storageLocation = "/var/data/buckets/public"
[thumbnails]
# Enable thumbnails? (add ?thumbnail to the end of a file object URL)
enable = true
# Thumbnailer URL. This is a endpoint that accepts a POST request containing
# raw image data and returns a thumbnail. For example, see
# https://owo.codes/whats-this/thumbnail-service.
thumbnailerURL = "http://localhost:8081/thumbnail"
# Enable thumbnail cache?
cacheEnable = true
# Thumbnail cache location (if enabled).
cacheLocation = "/tmp/thumbs"