Skip to content

Added "negative matcher" documentation#40282

Merged
ijjk merged 4 commits intocanaryfrom
steven-tey-patch-2
Sep 13, 2022
Merged

Added "negative matcher" documentation#40282
ijjk merged 4 commits intocanaryfrom
steven-tey-patch-2

Conversation

@steven-tey
Copy link
Copy Markdown
Contributor

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running pnpm lint
  • The examples guidelines are followed from our contributing doc

styfle
styfle previously approved these changes Sep 6, 2022
Comment thread docs/advanced-features/middleware.md Outdated
}
```

You can also create a "negative matcher" that matches all paths except for certain paths:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we expand this to say full regex matching can be used including negative lookaheads like this

@ijjk ijjk merged commit f33c23c into canary Sep 13, 2022
@ijjk ijjk deleted the steven-tey-patch-2 branch September 13, 2022 01:26
* - static (static files)
* - favicon.ico (favicon file)
*/
'/((?!api|static|favicon.ico).*)',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I exclude the homepage "/" from the matches?

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants