Update AppServiceProvider to force HTTPS and configure APP_URL in app.php
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m1s
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m1s
This commit is contained in:
@@ -14,6 +14,11 @@ class AppServiceProvider extends ServiceProvider {
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// Force HTTPS URLs when behind a proxy (Traefik)
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
||||
\URL::forceSchema('https');
|
||||
}
|
||||
|
||||
//
|
||||
\Blade::extend(function($value) {
|
||||
return preg_replace('/\@define(.+)/', '<?php ${1}; ?>', $value);
|
||||
|
||||
@@ -26,7 +26,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://localhost',
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="text-center" id="homepage-logo">
|
||||
<img src="{{asset('/public/images/logo.png')}}" class="img img-responsive" />
|
||||
<img src="{{asset('/images/logo.png')}}" class="img img-responsive" />
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
|
||||
Reference in New Issue
Block a user