Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
15784703
Commit
15784703
authored
2 years ago
by
Thijs Kinkhorst
Browse files
Options
Downloads
Patches
Plain Diff
Implement phpinfo controller as a StreamedResponse
parent
3f1ea06c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/admin/src/Controller/Config.php
+6
-8
6 additions, 8 deletions
modules/admin/src/Controller/Config.php
with
6 additions
and
8 deletions
modules/admin/src/Controller/Config.php
+
6
−
8
View file @
15784703
...
...
@@ -14,6 +14,7 @@ use SimpleSAML\Utils;
use
SimpleSAML\XHTML\Template
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\HttpFoundation\StreamedResponse
;
/**
* Controller class for the admin module.
...
...
@@ -165,18 +166,15 @@ class Config
*
* @param \Symfony\Component\HttpFoundation\Request $request The current request.
*
* @return \Symfony\Component\HttpFoundation\Response The output of phpinfo()
* @return \Symfony\Component\HttpFoundation\
Streamed
Response The output of phpinfo()
*/
public
function
phpinfo
(
/** @scrutinizer ignore-unused */
Request
$request
):
Response
public
function
phpinfo
(
/** @scrutinizer ignore-unused */
Request
$request
):
Streamed
Response
{
$this
->
authUtils
->
requireAdmin
();
ob_start
();
phpinfo
();
$phpinfo
=
ob_get_contents
();
ob_end_clean
();
return
new
Response
(
$phpinfo
);
return
new
StreamedResponse
(
function
()
{
phpinfo
();
});
}
/**
...
...
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