diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d6765c674506e52a98e7771b8652bb7b9b5f74d..4f038384bf5f6e8199cba7242116aa5e24b7315d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,6 +19,7 @@ update(proxy.suma-ev.de): - npm install - npm run production - cp ~/.env . + - touch storage/logs/laravel.log - chmod -R 777 storage - chmod -R 777 bootstrap/cache - if [ -f ~/Proxy/artisan ]; then php ~/Proxy/artisan down;fi diff --git a/app/HtmlDocument.php b/app/HtmlDocument.php index e8132b8c53ad1a7f10a90daedb7f4327827e9279..09dc186002cc4e43c6509dad0ca7bf648088de9c 100644 --- a/app/HtmlDocument.php +++ b/app/HtmlDocument.php @@ -97,6 +97,15 @@ class HtmlDocument extends Document foreach ($dom->getElementsByTagName('area') as $area) { # All Links within a "a" Tag need to target the top level because they change the site on click $this->convertTargetAttribute($area, "_top"); + if ($area->hasAttribute("href")) { + $href = $area->getAttribute("href"); + # Rel to abs + $href = $this->convertRelativeToAbsoluteLink($href); + # Abs to proxified + $href = $this->proxifyUrl($href, true); + # And replace + $area->setAttribute("href", $href); + } } foreach ($dom->getElementsByTagName('form') as $form) { diff --git a/app/Http/Controllers/ProxyController.php b/app/Http/Controllers/ProxyController.php index ab4ebcad4ab3727f5f0fab36a71140c54694731d..0803fd3c5427867da5e24cdacfed4d5b83d0856c 100644 --- a/app/Http/Controllers/ProxyController.php +++ b/app/Http/Controllers/ProxyController.php @@ -191,6 +191,7 @@ class ProxyController extends Controller case 'image/vnd.microsoft.icon': case 'application/vnd.ms-fontobject': case 'application/x-font-ttf': + case 'application/x-www-form-urlencoded': # Nothing to do with Images: Just return them break; case 'text/css':