Skip to content

Commit aef1585

Browse files
committed
Workaround Caddy placeholder + HTTPS limitation in errors.*
1 parent 8209b2e commit aef1585

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Caddyfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@
2525
# from: https://errors.httptoolkit.tech/o123/api/456/...
2626
# to: https://o123.ingest.us.sentry.io/api/456/...
2727
@has_id_path {
28-
path_regexp id_path ^/o(\d+)(.*)$
28+
path_regexp id_path ^/(o\d+)/(.*)$
2929
}
3030

3131
handle @has_id_path {
32-
reverse_proxy https://{re.id_path.1}.ingest.us.sentry.io {
33-
uri {re.id_path.2}
32+
reverse_proxy {
33+
to {re.id_path.1}.ingest.us.sentry.io:443/{re.id_path.2}
34+
transport http {
35+
# We have to TLS explicitly because you can't use https:// with a placeholder
36+
tls
37+
}
3438

3539
# Set appropriate headers
3640
header_up Host {upstream_hostport}

0 commit comments

Comments
 (0)