VolaFakeSSO = new VolaFakeHTTPResponder(); $this->headers = [ "Content-Type" => 'text/xml', ]; if (config('custom.compressed_responses',false) === TRUE) { $this->headers['content-encoding'] = 'gzip'; } } public function modelBasedRequest(Request $request) { \RequestLogger::logReceivedRequest($request); $responseContent = $this->VolaFakeSSO->getModelBasedResponses($request); $responseContent = $this->compressIfRequested($request, $responseContent); return response($responseContent['data'], $responseContent['status'], $this->headers); } public function manageLegacyRequest(Request $request) { \RequestLogger::logReceivedRequest($request); $picassoRequest = (str_starts_with($request->getRequestUri(), '/picasso/',)); $profile = Utils::getRequestedUser($request); if (isset($profile)) { $responseContent = $this->VolaFakeSSO->getResponses($request, $profile, $picassoRequest); \RequestLogger::logProcessedRequest($request, $responseContent); $responseContent = $this->compressIfRequested($request, $responseContent); return response($responseContent, 200, $this->headers); } else { \RequestLogger::logRejectedRequest($request); return response('No cookie, no logged', 400, $this->headers); } } }