Skip to content

Commit 3c31a09

Browse files
authored
docs(self-hosted): fix bad regexp for ingest only endpoint (#13892)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Closes #13554 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent f1bac8b commit 3c31a09

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

develop-docs/self-hosted/experimental/reverse-proxy.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ We recommend TLS termination to be done on your own dedicated load balancer or p
2222

2323
Certain self-hosted deployments requires the dashboard to be accessed only via internal network. But, they also need to provide public Sentry ingestion endpoint for client devices such as mobile and desktop apps. You can expose some of these endpoints publicly:
2424

25-
- `/api/[1-9]\d+/envelope/` - Main endpoint for submitting event from SDK
26-
- `/api/[1-9]\d+/minidump/` - Endpoint for submitting minidump from native SDKs
27-
- `/api/[1-9]\d+/security/` - Endpoint for submitting security-related such as CSP errors
28-
- `/api/[1-9]\d+/store/` - Old endpoint for submitting event from SDK, it is deprecated.
29-
- `/api/[1-9]\d+/unreal/` - Endpoint for submitting crash report from Unreal Engine SDK
25+
- `/api/[1-9]+/envelope/` - Main endpoint for submitting event from SDK
26+
- `/api/[1-9]+/minidump/` - Endpoint for submitting minidump from native SDKs
27+
- `/api/[1-9]+/security/` - Endpoint for submitting security-related such as CSP errors
28+
- `/api/[1-9]+/store/` - Old endpoint for submitting event from SDK, it is deprecated.
29+
- `/api/[1-9]+/unreal/` - Endpoint for submitting crash report from Unreal Engine SDK
3030

31-
The `[1-9]\d+` is a regular expression string that is acquired from the project DSN.
31+
The `[1-9]+` is a regular expression string that is acquired from the project DSN.
3232

3333
## Rate Limiting
3434

@@ -76,7 +76,7 @@ server {
7676
# by removing the other `location` directive.
7777
#
7878
# It is recomended to put a rate limiter on the ingest endpoints.
79-
location ~ ^/api/[1-9]\d*/(envelope|minidump|security|store|unreal)/ {
79+
location ~ ^/api/[1-9]+/(envelope|minidump|security|store|unreal)/ {
8080
add_header Access-Control-Allow-Origin * always;
8181
add_header Access-Control-Allow-Credentials false always;
8282
add_header Access-Control-Allow-Methods GET,POST,PUT always;
@@ -127,7 +127,7 @@ sentry.yourcompany.com {
127127
# by removing the other `handle` directive.
128128
#
129129
# It is recomended to put a rate limiter on the ingest endpoints.
130-
@ingest_endpoint path_regexp ^/api/[1-9]\d+/(envelope|minidump|security|store|unreal)/
130+
@ingest_endpoint path_regexp ^/api/[1-9]+/(envelope|minidump|security|store|unreal)/
131131
132132
handle @ingest_endpoint {
133133
header {
@@ -197,7 +197,7 @@ http:
197197
- web # Assuming this your HTTP entrypoint
198198
- websecure # Assuming this is your HTTPS entrypoint
199199
service: sentry@file
200-
rule: "Host(`sentry.yourcompany.com`) && PathRegexp(`^/api/[1-9]\\d+/(envelope|minidump|security|store|unreal)`)"
200+
rule: "Host(`sentry.yourcompany.com`) && PathRegexp(`^/api/[1-9]+/(envelope|minidump|security|store|unreal)`)"
201201
tls:
202202
certResolver: letsencrypt # Assuming you have a TLS certificate resolver named "letsencrypt"
203203
middlewares:
@@ -300,7 +300,7 @@ frontend https_bind
300300
mode http
301301
302302
acl sentry_domain hdr(host) -i sentry.yourcompany.com
303-
acl ingest_endpoint path_reg -i /api/[1-9]\d+/(envelope|minidump|security|store|unreal)/
303+
acl ingest_endpoint path_reg -i /api/[1-9]+/(envelope|minidump|security|store|unreal)/
304304
305305
# Handle CORS-related headers for ingest endpoints.
306306
# You can also only expose the ingest endpoints only,

0 commit comments

Comments
 (0)