Skip to content

Commit 1517086

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

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Caddyfile

+8-3
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@
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
34+
uri /{re.id_path.2}
35+
transport http {
36+
# We have to TLS explicitly because you can't use https:// with a placeholder
37+
tls
38+
}
3439

3540
# Set appropriate headers
3641
header_up Host {upstream_hostport}

0 commit comments

Comments
 (0)