Преглед на файлове

:bug: force to using https on production mode

Jeremy Zheng преди 1 седмица
родител
ревизия
95b6062d59
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      api-v13/app/Providers/AppServiceProvider.php

+ 5 - 0
api-v13/app/Providers/AppServiceProvider.php

@@ -96,6 +96,11 @@ class AppServiceProvider extends ServiceProvider
         */
         $this->configureDefaults();
 
+	// Force HTTPS scheme in production
+        if ($this->app->environment('production')) {
+            URL::forceScheme('https');
+        }
+
         /*
         |--------------------------------------------------------------------------
         | Custom Query Builder Macros