query('v')) && hash_equals($version, $request->query('v')) ? 'public, max-age=31536000, immutable' : 'no-store'; $response = response( $contents, 200, [ 'Content-Type' => 'application/javascript', ] )->setLastModified(DateTime::createFromFormat('U', (string) filemtime($path))); $response->headers->set('Cache-Control', $cacheControl); return $response; } }