In your defined route for /news[/{params:.*}] the following paths qualify:

/news
/news/foo
/news/foo/bar
/news/foo/bar/...

So adding an extra fixed segment /details won't work if you add it after the square brackets.

When you define it as /news[/{params:.*}/details] with the /details segment within the square brackets it does work for details, but not in combination with the first route & will break. You can still go with your first route & check the last param, or with an optional param within:

The actual problem here seems like a colliding definition in the routes, where for example the unlimited optional segments would always match the second defined route. It can be solved by defining the routes with a route regex & enclosing them in a route group prior to non-colliding matches: