Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
Proxy
Commits
47a44fd6
Commit
47a44fd6
authored
7 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
app/HtmlDocument.php
+9
-0
9 additions, 0 deletions
app/HtmlDocument.php
app/Http/Controllers/ProxyController.php
+1
-0
1 addition, 0 deletions
app/Http/Controllers/ProxyController.php
with
11 additions
and
0 deletions
.gitlab-ci.yml
+
1
−
0
View file @
47a44fd6
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
app/HtmlDocument.php
+
9
−
0
View file @
47a44fd6
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/ProxyController.php
+
1
−
0
View file @
47a44fd6
...
@@ -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'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment