diff --git a/app/Factories/NginxVhostFactory.php b/app/Factories/NginxVhostFactory.php index f511fa9..2f36b92 100644 --- a/app/Factories/NginxVhostFactory.php +++ b/app/Factories/NginxVhostFactory.php @@ -140,17 +140,20 @@ class NginxVhostFactory if ($vhost['ssl_certificate_exists']) { $builder->addStaticItem('expired_at: '.$vhost['ssl_certificate_expired_at']); } else { + + // add certificate $builder->addItem('add certificate', function(CliMenu $menu) { $result = $menu->askText() ->setPromptText('Enter E-Mail') ->ask(); $email = $result->fetch(); - $this->call('lets-encrypt:add', [ 'email' => $email, 'domain' => $vhost['domain'] ]); + system(base_path().' php mcp lets-encrypt:add '.$email.' '.$vhost['domain']); if ($vhost['redirect_www'] === true) { - $this->call('lets-encrypt:add', [ 'email' => $email, 'domain' => 'www.'.$vhost['domain'] ]); + system(base_path().' php mcp lets-encrypt:add '.$email.' www.'.$vhost['domain']); } + }); } diff --git a/resources/nginx/templates/layouts/ssl.blade.php b/resources/nginx/templates/layouts/ssl.blade.php index 9e38c51..07ac05c 100644 --- a/resources/nginx/templates/layouts/ssl.blade.php +++ b/resources/nginx/templates/layouts/ssl.blade.php @@ -31,16 +31,6 @@ server { include /etc/nginx/snippets/ssl-params.conf; include /etc/nginx/snippets/secure-headers.conf; - add_header Content-Security-Policy " - default-src 'self'; - font-src 'self'; - style-src 'self'; - img-src 'self'; - base-uri 'self'; - form-action 'self'; - frame-ancestors 'self'; - "; - @include('partials.default', ['domain' => $domain]) @yield('server')