Skip to content
Snippets Groups Projects
Commit 47a44fd6 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Automatisches Update sollte nun funktionieren

Außerdem werden die href attribute von area tags nun korrekt proxifiziert.
parent ca918122
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ update(proxy.suma-ev.de): ...@@ -19,6 +19,7 @@ update(proxy.suma-ev.de):
- npm install - npm install
- npm run production - npm run production
- cp ~/.env . - cp ~/.env .
- touch storage/logs/laravel.log
- chmod -R 777 storage - chmod -R 777 storage
- chmod -R 777 bootstrap/cache - chmod -R 777 bootstrap/cache
- if [ -f ~/Proxy/artisan ]; then php ~/Proxy/artisan down;fi - if [ -f ~/Proxy/artisan ]; then php ~/Proxy/artisan down;fi
......
...@@ -97,6 +97,15 @@ class HtmlDocument extends Document ...@@ -97,6 +97,15 @@ class HtmlDocument extends Document
foreach ($dom->getElementsByTagName('area') as $area) { 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 # All Links within a "a" Tag need to target the top level because they change the site on click
$this->convertTargetAttribute($area, "_top"); $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) { foreach ($dom->getElementsByTagName('form') as $form) {
......
...@@ -191,6 +191,7 @@ class ProxyController extends Controller ...@@ -191,6 +191,7 @@ class ProxyController extends Controller
case 'image/vnd.microsoft.icon': case 'image/vnd.microsoft.icon':
case 'application/vnd.ms-fontobject': case 'application/vnd.ms-fontobject':
case 'application/x-font-ttf': case 'application/x-font-ttf':
case 'application/x-www-form-urlencoded':
# Nothing to do with Images: Just return them # Nothing to do with Images: Just return them
break; break;
case 'text/css': case 'text/css':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment