-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathCaddyfile
More file actions
185 lines (158 loc) · 4.68 KB
/
Caddyfile
File metadata and controls
185 lines (158 loc) · 4.68 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{
storage file_system {
root /data
}
on_demand_tls {
ask http://ethernal.internal:8080/api/caddy/validDomain
}
}
blog.tryethernal.com {
redir * https://tryethernal.com/blog{uri} permanent
}
(common) {
header {
Apx-Incoming-Host "{host}"
}
@checkVerifyStatus {
path /api
query module=contract
query action=checkverifystatus
query apikey=*
}
handle @checkVerifyStatus {
rewrite * /api/contracts/verificationStatus
reverse_proxy ethernal.internal:8080
}
@getSourceCode {
path /api
query module=contract
query action=getsourcecode
query apikey=*
}
handle @getSourceCode {
rewrite * /api/contracts/sourceCode
reverse_proxy ethernal.internal:8080
}
@getAbi {
path /api
query module=contract
query action=getabi
query apikey=*
}
handle @getAbi {
rewrite * /api/contracts/getabi
reverse_proxy ethernal.internal:8080
}
handle_path /ingest/* {
reverse_proxy https://us.i.posthog.com {
header_up Host us.i.posthog.com
}
}
handle /api/2/* {
reverse_proxy https://sentry.tryethernal.com {
header_up Host sentry.tryethernal.com
}
}
@fallbackApi {
path /api* /webhooks*
}
handle @fallbackApi {
reverse_proxy ethernal.internal:8080
}
handle_path /bull* {
reverse_proxy ethernal.internal:8080
}
handle /app* {
reverse_proxy ethernal-soketi:6001 {
header_up Upgrade "websocket"
header_up Connection "Upgrade"
}
}
handle_path /sentry-dashboard* {
basicauth {
{$SENTRY_DASHBOARD_USERNAME} {$SENTRY_DASHBOARD_PASSWORD_HASH}
}
root * /srv/sentry-dashboard
try_files {path} /index.html
file_server
}
handle_path /admin/* {
root * /srv/admin
try_files {path} /index.html
file_server
}
@landing host tryethernal.com www.tryethernal.com
handle @landing {
# 301 redirects for Ghost-era blog URLs
@blogTagPages path /blog/tag/*
handle @blogTagPages {
redir * /blog permanent
}
@blogAlchemy3 path /blog/ethernal-x-alchemy-3
handle @blogAlchemy3 {
redir * /blog/ethernal-x-alchemy permanent
}
@blogCdnCgi path /blog/cdn-cgi/*
handle @blogCdnCgi {
respond 410
}
handle_path /blog/* {
root * /srv/blog
try_files {path} {path}.html {path}/index.html /index.html
file_server
}
handle /blog {
root * /srv/blog
try_files /index.html
file_server
}
handle {
root * /srv/landing
try_files {path} {path}.html {path}/index.html /index.html
file_server
}
}
handle {
root * /srv/app
try_files {path} /index.html
file_server
}
encode gzip
}
# app.tryethernal.com: 301 landing/blog paths to apex, pass through app routes to SPA.
# NOTE: the path list below is an explicit allowlist. When adding a new top-level
# landing route (e.g. a new /chains/<slug>, /compare page, or root-level marketing
# page), update @landingPaths or @landingPathPrefixes below. Source of truth for
# landing routes: landing/src/router.js.
app.tryethernal.com {
tls contact@tryethernal.com {
ca https://dv.acme-v02.api.pki.goog/directory
eab {env.GTS_EAB_KEY_ID} {env.GTS_EAB_HMAC_KEY}
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
@landingPaths path /blockscout-alternative /etherscan-alternative /routescan-alternative /build-vs-buy-block-explorer /op-stack /arbitrum-orbit /pricing /features /developers /teams /app-chains /transaction-tracing /contact-us /hardhat-block-explorer /anvil-block-explorer /ganache-block-explorer /kaleido /chainstack /github-actions /terms /privacy
handle @landingPaths {
redir https://tryethernal.com{uri} permanent
}
@landingPathPrefixes path /blog* /chains/* /tools/*
handle @landingPathPrefixes {
redir https://tryethernal.com{uri} permanent
}
import common
}
# Wildcard cert for *.tryethernal.com subdomains (DNS challenge via Google Trust Services)
*.tryethernal.com {
tls contact@tryethernal.com {
ca https://dv.acme-v02.api.pki.goog/directory
eab {env.GTS_EAB_KEY_ID} {env.GTS_EAB_HMAC_KEY}
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
import common
}
# Custom domains use on-demand TLS (HTTP challenge)
:443 {
tls {
on_demand
}
import common
}