Fixes #8584, #8654, #8727 - fixes and improvements for saml (#8795)

* Let onelogin/php-saml know to use 'X-Forwarded-*' headers if it is from a trusted proxy

* Gracefully handle the case where openssl_csr_new fails when openssl.cnf is invalid/missing

* Improve ui of saml sp metadata by displaying it's url and a download button
This commit is contained in:
johnson-yi
2020-11-21 13:54:25 +11:00
committed by GitHub
parent 8a38b9d018
commit 0cdd83aabf
5 changed files with 34 additions and 17 deletions
+4 -2
View File
@@ -53,8 +53,10 @@ class SamlController extends Controller
if (empty($metadata)) {
return response()->view('errors.403', [], 403);
}
return response($metadata)->header('Content-Type', 'text/xml');
return response()->streamDownload(function () use ($metadata) {
echo $metadata;
}, 'snipe-it-metadata.xml', ['Content-Type' => 'text/xml']);
}
/**