Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

asd?

Andras Bacsai820e432f92af
diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php
index 3391630ecc..c80ad531b8 100644
--- a/app/Http/Middleware/TrustProxies.php
+++ b/app/Http/Middleware/TrustProxies.php
@@ -12,7 +12,7 @@ class TrustProxies extends Middleware
*
* @var array<int, string>|string|null
*/
- protected $proxies;
+ protected $proxies = '*';
/**
* The headers that should be used to detect proxies.
@@ -20,7 +20,7 @@ class TrustProxies extends Middleware
* @var int
*/
protected $headers =
- Request::HEADER_X_FORWARDED_FOR |
+ Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index 02c59bd003..fabae393c8 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -24,15 +24,15 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
- if ($this->app->environment('production')) {
- try {
- $settings = InstanceSettings::first();
- if (Str::startsWith($settings->fqdn, 'https')) {
- URL::forceScheme('https');
- }
- } catch (\Exception $e) {
- // do nothing
- }
- }
+ // if ($this->app->environment('production')) {
+ // try {
+ // $settings = InstanceSettings::first();
+ // if (Str::startsWith($settings->fqdn, 'https')) {
+ // URL::forceScheme('https');
+ // }
+ // } catch (\Exception $e) {
+ // // do nothing
+ // }
+ // }
}
}
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 57fa14c27d..6c1e8eddda 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -1,11 +1,16 @@
<?php
+use App\Models\InstanceSettings;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Route;
use Visus\Cuid2\Cuid2;
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)
{
try {
diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.php
index f68ade2d31..6d3c3e6d9c 100644
--- a/resources/views/components/layout.blade.php
+++ b/resources/views/components/layout.blade.php
@@ -25,6 +25,11 @@
</head>
<body>
+ {{-- @if (is_https())
+ <script>
+ console.log('asd')
+ </script>
+ @else --}}
@livewireScripts
@auth
<x-navbar />
@@ -60,6 +65,7 @@
})
</script>
@endauth
+ {{-- @endif --}}
</body>