From 11806d2cfdfe47870bdbe54c15912be4badc3350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Mon, 21 Sep 2020 20:08:24 +0200 Subject: [PATCH] adding #45 --- app/Factories/NginxVhostFactory.php | 7 +++++-- resources/nginx/templates/layouts/ssl.blade.php | 10 ---------- 2 files changed, 5 insertions(+), 12 deletions(-) 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')