mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:07:33 -05:00 
			
		
		
		
	Remove URL from self host error logs
This commit is contained in:
		
							parent
							
								
									b0cb73757a
								
							
						
					
					
						commit
						7b7ee5084f
					
				@ -431,14 +431,12 @@ class Utils
 | 
			
		||||
 | 
			
		||||
    public static function prepareErrorData($context)
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
        $data = [
 | 
			
		||||
            'context' => $context,
 | 
			
		||||
            'user_id' => Auth::check() ? Auth::user()->id : 0,
 | 
			
		||||
            'account_id' => Auth::check() ? Auth::user()->account_id : 0,
 | 
			
		||||
            'user_name' => Auth::check() ? Auth::user()->getDisplayName() : '',
 | 
			
		||||
            'method' => Request::method(),
 | 
			
		||||
            'url' => Input::get('url', Request::url()),
 | 
			
		||||
            'previous' => url()->previous(),
 | 
			
		||||
            'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
 | 
			
		||||
            'locale' => App::getLocale(),
 | 
			
		||||
            'ip' => Request::getClientIp(),
 | 
			
		||||
@ -447,6 +445,15 @@ class Utils
 | 
			
		||||
            'is_api' => session('token_id') ? 'yes' : 'no',
 | 
			
		||||
            'db_server' => config('database.default'),
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
        if (static::isNinja()) {
 | 
			
		||||
            $data['url'] = Input::get('url', Request::url());
 | 
			
		||||
            $data['previous'] = url()->previous();
 | 
			
		||||
        } else {
 | 
			
		||||
            $data['url'] = request()->path();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $data;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static function getErrors()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user