Allow forceHttps to be disabled, fixes #3710

pull/3861/head
Daniel Supernault 2022-12-01 20:59:57 -07:00
rodzic f776c79284
commit a31bdec750
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -40,9 +40,10 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
if (preg_match("/^https/", env('APP_URL')) || env('APP_ENV') === 'production') {
if(config('instance.force_https_urls')) {
URL::forceScheme('https');
}
Schema::defaultStringLength(191);
Paginator::useBootstrap();
Avatar::observe(AvatarObserver::class);

Wyświetl plik

@ -1,6 +1,7 @@
<?php
return [
'force_https_urls' => env('FORCE_HTTPS_URLS', true),
'description' => env('INSTANCE_DESCRIPTION', 'Pixelfed - Photo sharing for everyone'),