File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 2020 }
2121}
2222
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+
2344# For any other unrecognized services, we reject the request outright:
2445:80 , :443 , :{$PORT:8080 } {
2546 log
You can’t perform that action at this time.
0 commit comments