diff --git a/.env b/.env index be55fc1..4af7d02 100644 --- a/.env +++ b/.env @@ -95,3 +95,6 @@ ENABLE_SOCIAL_LOGIN=false #Sets if a plain PNG or iframe should be used for the theme preview image USE_THEME_PREVIEW_IFRAME=true + +#Redirects all pages to https +FORCE_ROUTE_HTTPS=false \ No newline at end of file diff --git a/resources/views/layouts/lang.blade.php b/resources/views/layouts/lang.blade.php index 05a064f..6e6b370 100644 --- a/resources/views/layouts/lang.blade.php +++ b/resources/views/layouts/lang.blade.php @@ -1,3 +1,4 @@ +@if(env('FORCE_HTTPS') == 'true')@endif @if(env('CUSTOM_META_TAGS') == 'true' and config('advanced-config.lang') != '') @else @@ -6,7 +7,7 @@ {{-- Redirects to https if enabled in the advanced-config --}} -@if(env('FORCE_HTTPS') == 'true') +@if(env('FORCE_ROUTE_HTTPS') == 'true') @php if (! isset($_SERVER['HTTPS']) or $_SERVER['HTTPS'] == 'off' ) { $redirect_url = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; diff --git a/routes/web.php b/routes/web.php index 82baf4c..e6354a3 100755 --- a/routes/web.php +++ b/routes/web.php @@ -73,7 +73,7 @@ Route::get('/theme/@{littlelink}', [UserController::class, 'theme'])->name('them Route::group([ 'middleware' => env('REGISTER_AUTH'), ], function () { -if(env('FORCE_HTTPS') == 'true'){URL::forceScheme('https');} +if(env('FORCE_ROUTE_HTTPS') == 'true'){URL::forceScheme('https');} if(isset($_COOKIE['LinkCount'])){if($_COOKIE['LinkCount'] == '20'){$LinkPage = 'showLinks20';}elseif($_COOKIE['LinkCount'] == '30'){$LinkPage = 'showLinks30';}elseif($_COOKIE['LinkCount'] == 'all'){$LinkPage = 'showLinksAll';} else {$LinkPage = 'showLinks';}} else {$LinkPage = 'showLinks';} //Shows correct link number Route::get('/studio/index', [UserController::class, 'index'])->name('studioIndex'); Route::get('/studio/add-link', [UserController::class, 'AddUpdateLink'])->name('showButtons'); @@ -112,7 +112,7 @@ Route::get('/social-auth/{provider}', [SocialLoginController::class, 'redirectTo Route::group([ 'middleware' => 'admin', ], function () { - if(env('FORCE_HTTPS') == 'true'){URL::forceScheme('https');} + if(env('FORCE_ROUTE_HTTPS') == 'true'){URL::forceScheme('https');} Route::get('/panel/index', [AdminController::class, 'index'])->name('panelIndex'); Route::get('/panel/users/{type}', [AdminController::class, 'users'])->name('showUsers'); Route::post('/panel/users/{name?}', [AdminController::class, 'searchUser'])->name('searchUser'); diff --git a/storage/backups/default_settings b/storage/backups/default_settings index 59cbc0d..f9b54d3 100644 --- a/storage/backups/default_settings +++ b/storage/backups/default_settings @@ -94,4 +94,7 @@ ENABLE_THEME_UPDATER=true ENABLE_SOCIAL_LOGIN=false #Sets if a plain PNG or iframe should be used for the theme preview image -USE_THEME_PREVIEW_IFRAME=true \ No newline at end of file +USE_THEME_PREVIEW_IFRAME=true + +#Redirects all pages to https +FORCE_ROUTE_HTTPS=false \ No newline at end of file