title: Webhook not valid after <Redirect> in Twilio
body: <p>I am trying to test a workflow in twilio, the workflow is like this:</p>
  <ul>
  <li>A call comes in and my server gets hit by twilio, the request is valid per the <a href="https://www.twilio.com/docs/usage/security" rel="nofollow noreferrer">docs</a></li>
  <li>The webhook returns a Twiml with a Redirect to another endpoint in order to enqueue the call.</li>
  <li>On this endpoint the webhook is invalid.</li>
  </ul>
  <p>All endpoints except for this second endpoint are being validated correctly. Is there any special case I need to account for when validating redirects like this?</p>
  <p>I am using laravel if that matters.</p>
  <p>[Edit1]</p>
  <p>The twiml looks like this</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;Response&gt;
      &lt;Say&gt;&lt;/Say&gt;
      &lt;Redirect&gt;https://example.com/webhook/call/handle-incoming-call?Enqueue=1&lt;/Redirect&gt;
  &lt;/Response&gt;
  </code></pre>
  <p>After making the redirection to that url the request returns a 403 error.</p>
  <p>For validation, I am using the following code in a middleware for the routes in laravel.</p>
  <pre><code>&lt;?php
  
  namespace App\Http\Middleware;
  
  use Closure;
  use Illuminate\Http\Response;
  use Twilio\Security\RequestValidator;
  
  class TwilioRequestValidator
  {
      /**
       * Handle an incoming request.
       *
       * @param \Illuminate\Http\Request $request
       * @param \Closure $next
       * @return mixed
       */
      public function handle($request, Closure $next)
      {
          // Be sure TWILIO_TOKEN is set in your .env file.
          // You can get your authentication token in your twilio console https://www.twilio.com/console
          $requestValidator = new RequestValidator(env('TWILIO_TOKEN'));
  
          $requestData = $request-&gt;toArray();
  
          // Switch to the body content if this is a JSON request.
          if (array_key_exists('bodySHA256', $requestData)) {
              $requestData = $request-&gt;getContent();
          }
          $isValid = false;
  
          if ($request-&gt;hasHeader('X-Twilio-Signature')) {
              $isValid = $requestValidator-&gt;validate(
                  $request-&gt;header('X-Twilio-Signature'),
                  $request-&gt;fullUrl(),
                  $requestData
              );
          }
  
  
          if ($isValid) {
              return $next($request);
          } else {
              return new Response('Invalid Request', 403);
          }
      }
  }
  </code></pre>
  <p>Thanks.</p>