title: Laravel 5.6 signed url won't work in APP_ENV=production
body: <p>I've setup two routes</p>
  
  <pre><code>Route::get('/bugreport', 'SomeController@create')
      -&gt;middleware('signed')
      -&gt;name('bugreport');
  
  Route::get('/getlink', function() {
      return dd(\URL::signedRoute('bugreport', ['data' =&gt; 3]));
  });
  </code></pre>
  
  <p>When <code>APP_ENV=local</code> I can visit <code>/getlink</code> then hit the resulting url and have it show. When <code>APP_ENV=production</code> (the actual physical environment has not changed when changing the variable) this no longer works... stating invalid signature. Any suggestions? </p>
  
  <p>UPDATE:</p>
  
  <p>We do have... which might be part of it</p>
  
  <pre><code>class AppServiceProvider extends ServiceProvider
  {
  /**
   * Bootstrap any application services.
   *
   * @return void
   */
  public function boot()
  {
      if (!config('app.is_local')) {
          URL::forceScheme('https');
      }
  }
  </code></pre>
  
  <p>Note: removing the above code actually does fix this issue, but then it breaks e.g. login... so either need to understand why, or this isn't an option :(. </p>
  
  <p>Update Update: </p>
  
  <p>The environment is heroku and the .htaccess has (as per <a href="https://help.heroku.com/J2R1S4T8/can-heroku-force-an-application-to-use-ssl-tls" rel="nofollow noreferrer">https://help.heroku.com/J2R1S4T8/can-heroku-force-an-application-to-use-ssl-tls</a>) </p>
  
  <pre><code>#### FORCE SSL
  ## see - https://help.heroku.com/J2R1S4T8/can-heroku-force-an-application-to-use-ssl-tls
  RewriteCond %{HTTP_HOST} !=localhost
  # If we receive a forwarded http request from a proxy...
  RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
  
  # ...or just a plain old http request directly from the client
  RewriteCond %{HTTP:X-Forwarded-Proto} =""
  RewriteCond %{HTTPS} !=on
  
  # Redirect to https version
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  ### End Force SSL
  </code></pre>