We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca492a6 commit 8209b2eCopy full SHA for 8209b2e
Caddyfile
@@ -20,6 +20,27 @@
20
}
21
22
23
+{$ERRORS_DOMAIN:errors.httptoolkit.tech}:{$PORT:8080} {
24
+ # This redirects Sentry requests from our own domain to their per-project subdomains:
25
+ # from: https://errors.httptoolkit.tech/o123/api/456/...
26
+ # to: https://o123.ingest.us.sentry.io/api/456/...
27
+ @has_id_path {
28
+ path_regexp id_path ^/o(\d+)(.*)$
29
+ }
30
+
31
+ handle @has_id_path {
32
+ reverse_proxy https://{re.id_path.1}.ingest.us.sentry.io {
33
+ uri {re.id_path.2}
34
35
+ # Set appropriate headers
36
+ header_up Host {upstream_hostport}
37
38
+ # Anonymize ip addresses when forwarding:
39
+ header_up X-Forwarded-For "\.\d{0,3}(,\s*|$)" ".0$1"
40
41
42
+}
43
44
# For any other unrecognized services, we reject the request outright:
45
:80, :443, :{$PORT:8080} {
46
log
0 commit comments