File tree Expand file tree Collapse file tree 4 files changed +22
-4
lines changed
Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 11APP_NAME = Laravel
2- APP_ENV = local
2+ APP_ENV = production
33APP_KEY =
4+ APP_FORCE_HTTPS = false
45APP_DEBUG = true
56APP_URL = http://localhost
67
Original file line number Diff line number Diff line change 11APP_NAME = Deming
2- APP_ENV = local
2+ APP_ENV = production
33APP_KEY =
4+ APP_FORCE_HTTPS = false
45APP_DEBUG = true
56APP_URL = http://deming.yourdomain.com
67APP_TIMEZONE = ' Europe/Paris'
Original file line number Diff line number Diff line change @@ -28,11 +28,16 @@ public function register()
2828 */
2929 public function boot ()
3030 {
31- if (App::environment ('production ' )) {
31+ if (
32+ (App::environment ('production ' ) && (config ('app.force_https ' )===null ))
33+ ||
34+ Config::get ('app.force_https ' )
35+ )
36+ {
3237 URL ::forceScheme ('https ' );
3338 }
3439
35- if (env ( ' APP_DEBUG ' )) {
40+ if (config ( ' app.debug ' )) {
3641 DB ::listen (function ($ query ) {
3742 Log::info (
3843 $ query ->sql ,
Original file line number Diff line number Diff line change 2828
2929 'env ' => env ('APP_ENV ' , 'production ' ),
3030
31+ /*
32+ |--------------------------------------------------------------------------
33+ | Application Force HTTPS
34+ |--------------------------------------------------------------------------
35+ |
36+ | This ariable force the use of HTTPS in the applucation URL
37+ |
38+ */
39+
40+ 'force_https ' => env ('APP_FORCE_HTTPS ' , null ),
41+
3142 /*
3243 |--------------------------------------------------------------------------
3344 | Application Debug Mode
You can’t perform that action at this time.
0 commit comments