asd?
This commit is contained in:
		@@ -12,7 +12,7 @@ class TrustProxies extends Middleware
 | 
				
			|||||||
     *
 | 
					     *
 | 
				
			||||||
     * @var array<int, string>|string|null
 | 
					     * @var array<int, string>|string|null
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    protected $proxies;
 | 
					    protected $proxies = '*';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * The headers that should be used to detect proxies.
 | 
					     * The headers that should be used to detect proxies.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,15 +24,15 @@ class AppServiceProvider extends ServiceProvider
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public function boot(): void
 | 
					    public function boot(): void
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if ($this->app->environment('production')) {
 | 
					        // if ($this->app->environment('production')) {
 | 
				
			||||||
            try {
 | 
					        //     try {
 | 
				
			||||||
                $settings = InstanceSettings::first();
 | 
					        //         $settings = InstanceSettings::first();
 | 
				
			||||||
                if (Str::startsWith($settings->fqdn, 'https')) {
 | 
					        //         if (Str::startsWith($settings->fqdn, 'https')) {
 | 
				
			||||||
                    URL::forceScheme('https');
 | 
					        //             URL::forceScheme('https');
 | 
				
			||||||
                }
 | 
					        //         }
 | 
				
			||||||
            } catch (\Exception $e) {
 | 
					        //     } catch (\Exception $e) {
 | 
				
			||||||
                // do nothing
 | 
					        //         // do nothing
 | 
				
			||||||
            }
 | 
					        //     }
 | 
				
			||||||
        }
 | 
					        // }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,16 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use App\Models\InstanceSettings;
 | 
				
			||||||
use Illuminate\Database\QueryException;
 | 
					use Illuminate\Database\QueryException;
 | 
				
			||||||
use Illuminate\Support\Facades\Http;
 | 
					use Illuminate\Support\Facades\Http;
 | 
				
			||||||
use Illuminate\Support\Facades\Route;
 | 
					use Illuminate\Support\Facades\Route;
 | 
				
			||||||
use Visus\Cuid2\Cuid2;
 | 
					use Visus\Cuid2\Cuid2;
 | 
				
			||||||
use Illuminate\Support\Str;
 | 
					use Illuminate\Support\Str;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function is_https()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return Str::of(InstanceSettings::get()->fqdn)->startsWith('https');
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
function general_error_handler(\Throwable $e, $that = null, $isJson = false)
 | 
					function general_error_handler(\Throwable $e, $that = null, $isJson = false)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,6 +25,11 @@
 | 
				
			|||||||
</head>
 | 
					</head>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
 | 
					    {{-- @if (is_https())
 | 
				
			||||||
 | 
					        <script>
 | 
				
			||||||
 | 
					            console.log('asd')
 | 
				
			||||||
 | 
					        </script>
 | 
				
			||||||
 | 
					    @else --}}
 | 
				
			||||||
    @livewireScripts
 | 
					    @livewireScripts
 | 
				
			||||||
    @auth
 | 
					    @auth
 | 
				
			||||||
        <x-navbar />
 | 
					        <x-navbar />
 | 
				
			||||||
@@ -60,6 +65,7 @@
 | 
				
			|||||||
            })
 | 
					            })
 | 
				
			||||||
        </script>
 | 
					        </script>
 | 
				
			||||||
    @endauth
 | 
					    @endauth
 | 
				
			||||||
 | 
					    {{-- @endif --}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user