3 years ago

Forcing HTTPS Routes on Laravel 5.2

Posted 3 years ago by janokary

Hi I want to only use https in my web site.

I followed the instructions here http://www.jeffmould.com/2016/01/31/laravel-5-2-forcing-https-routes-when-using-ssl/ with success but there are two cases that this doesn't work.

  1. After login I redirect to a non secure page.
  2. in routes like this one:

Route::get('timezones', 'Api\Utilities\[email protected]');

public function timeZones() { $timeZones =\DateTimeZone::listIdentifiers(); return $timeZones; }

I use:

  • laravel v5.2.31
  • on heroku
  • php (7.0.7)
  • ext-mbstring (bundled with php)
  • apache (2.4.20)
  • nginx (1.8.1)

Any ideas?

Please sign in or create an account to participate in this conversation.