Skip to content

Commit 5b050ff

Browse files
committed
add haloy config
1 parent 1f0add6 commit 5b050ff

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

cmd/cors-proxy/haloy.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: cors-proxy
2+
server: haloy-api.firu.dev
3+
4+
domains:
5+
- domain: cors-proxy.firu.dev
6+
7+
env:
8+
- name: PRODUCTION
9+
value: "true"
10+
- name: RATE_IP_SOURCE_HEADER
11+
value: x-forwarded-for # set by haloy-proxy

cmd/cors-proxy/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ type config struct {
210210
UpstreamTimeout time.Duration `env:"UPSTREAM_TIMEOUT,default=15s"`
211211
MaxResponseSize int64 `env:"MAX_RESPONSE_SIZE,default=1048576"` // 1MiB
212212
AllowedHosts []string `env:"ALLOWED_HOSTS,default=github.com,raw.githubusercontent.com,gitlab.com,codeberg.org"`
213-
RateTokens uint64 `env:"RATE_TOKENS,default=40"` // 40 req/min should be ok for legit usage
213+
RateTokens uint64 `env:"RATE_TOKENS,default=60"` // 60 req/min should be ok for legit usage
214214
RateInterval time.Duration `env:"RATE_INTERVAL,default=1m"`
215215
IpSourceHeader string `env:"RATE_IP_SOURCE_HEADER"` // for reverse proxy etc.
216216
}

0 commit comments

Comments
 (0)