How do I modify the query parameters?
1) you need to implement EventSubscriber, use KernelEvents::REQUEST in getSubscribedEvents() method

2) then you use \Drupal::request()-&gt;query-&gt;set('key', 'value');