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
0551c9e7
Commit
0551c9e7
authored
2 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
proper answer for javascript mime type
parent
0698398f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proxy/app/Http/Controllers/ProxyController.php
+9
-2
9 additions, 2 deletions
proxy/app/Http/Controllers/ProxyController.php
with
9 additions
and
2 deletions
proxy/app/Http/Controllers/ProxyController.php
+
9
−
2
View file @
0551c9e7
...
...
@@ -208,10 +208,12 @@ class ProxyController extends Controller
]),
413
);
}
else
if
(
$answer
[
"error"
]
===
CURLE_COULDNT_RESOLVE_HOST
)
{
return
view
(
'curl_errors.6'
,
[
"answer"
=>
$answer
]);
}
else
{
Log
::
info
(
"No view for this error. "
.
json_encode
(
$answer
));
}
}
if
(
$answer
===
null
)
{
if
(
$answer
===
null
||
!
array_key_exists
(
"http-code"
,
$answer
)
)
{
abort
(
400
,
"Couldn't fetch response"
,
[
"url"
=>
$targetUrl
]);
...
...
@@ -286,6 +288,10 @@ class ProxyController extends Controller
\App\PrometheusExporter
::
registerProxyPageCall
(
"pdf"
);
break
;
// no break
case
'application/javascript'
:
abort
(
415
);
case
'application/xml'
:
break
;
case
'image/png'
:
case
'image/jpeg'
:
case
'image/gif'
:
...
...
@@ -295,7 +301,8 @@ class ProxyController extends Controller
\App\PrometheusExporter
::
registerProxyPageCall
(
"image"
);
break
;
case
'video/mp4'
:
\App\PrometheusExporter
::
registerProxyPageCall
(
"image"
);
case
'video/webm'
:
\App\PrometheusExporter
::
registerProxyPageCall
(
"video"
);
break
;
case
'application/font-woff'
:
case
'application/x-font-woff'
:
...
...
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