Repository navigation
ref(api): Note that matchOperation doesn't support path prefixes - #131275
Conversation
matchOperation and createOperationMatcher only stripped API_BASE_PATH at the start of the path, so a self-hosted install served under a prefix, such as /sentry/api/0/, matched nothing. Find the base path anywhere in the path, as parseApiPathScope does. Co-Authored-By: BYK <[email protected]>
BYK
left a comment
There was a problem hiding this comment.
self-hosted install served under a prefix, such as /sentry/api/0/organizations/acme/issues/, therefore matched no operation
This should never happen as we actively discourage and try to prevent serving sentry under a path. This is not a path we support or should be concerned about. You may wanna note this in the code to prevent opening PRs like this in the future.
Sentry isn't supported when served under a path prefix, so drop the prefix search and note in the matcher that /sentry/api/0/... is deliberately not an API path. A test pins that.
|
Makes sense, I've dropped the prefix search in e252a3e88ef. The matcher only strips |
Part of #131203. Follow-up to #131235.
Sentry isn't supported when served under a path prefix, so
matchOperationandcreateOperationMatcherin@sentry/api/operationsstripAPI_BASE_PATHonly at the start of the path, unlikeparseApiPathScope. This adds a comment at that check saying/sentry/api/0/...is deliberately not an API path, so the difference isn't mistaken for a bug, and pins that prefixed paths match no operation. Matching behavior doesn't change.via @BYK.
--
View Session [Sentry]