Trigger redirect after Webform Remote Post Handler posted successfully I've made a webform with a handler. This handler does a Remote Post towards an API. This API is actually a custom module within the Drupal install which (after some logic) passes all of the preprocessed data towards another API. When that is passed successfully I get a redirect URL back from them, but whatever I use (TrustedRedirectResponse or just normal RedirectResponse) it won't redirect. It just reloads the form. 

How to solve this?
I've added the following to the handler:

/**
* {@inheritdoc}
*/
public function confirmForm(array &amp;$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) {
  if ($this-&gt;isDisabled()) {
    return;
  }

  $uri = new Url('entity.node.webform.user.submission', [
    'node' =&gt; $webform_submission-&gt;getSourceEntity()-&gt;id(),
    'webform_submission' =&gt; $webform_submission-&gt;id(),
  ]);
  $form_state-&gt;setResponse(new RedirectResponse($uri-&gt;toString()));
}


This seems to work.