preact-router icon indicating copy to clipboard operation
preact-router copied to clipboard

Allow optional host for matching

Open Meisolsson opened this issue 4 years ago • 0 comments

Hi,

We ran into case where we would like preact-router to handle complete URL:s. For example we get a link like https://example.com/test from our CMS and when the user clicks it we would prefer if Preact handled that but it should not handle https://other-site.com/test. I propose a prop on the router which can be checked against like:

<Router host={'https://example.com'}>
   ...
</Router>

Meisolsson avatar Aug 13 '20 10:08 Meisolsson