Giter VIP home page Giter VIP logo

Comments (8)

myfender avatar myfender commented on August 25, 2024 1

EDIT: I found the problem and I solved it: I was on my .env a costant called SESSION_DOMAIN with my production's url

I have the same error on my mac in localhost, on my vps it works without problem

Screenshot 2023-02-04 at 09 04 49

from log-viewer.

arukompas avatar arukompas commented on August 25, 2024

Hey @Merite15 ,

How are you accessing the Log Viewer? When does this error happen, after what action?

at the moment the Log Viewer can only be viewed via browser (not API access), so you'll need to make sure that your application still has the default web middleware group (defined in the app/Http/Kernel.php file), which is automatically applied to Log Viewer.

I can help more if you can share the contents of your app/Http/Kernel.php and config/log-viewer.php files.

from log-viewer.

Merite15 avatar Merite15 commented on August 25, 2024

there is my app/Http/kernel.php content:
?php

namespace App\Http;

use App\Http\Middleware\DynamicDB;
use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];

/**
 * The application's route middleware groups.
 *
 * @var array<string, array<int, class-string|string>>
 */
protected $middlewareGroups = [
    'web' => [
        \App\Http\Middleware\EncryptCookies::class,
        \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
        \Illuminate\Session\Middleware\StartSession::class,
        \Illuminate\View\Middleware\ShareErrorsFromSession::class,
        \App\Http\Middleware\VerifyCsrfToken::class,
        \Illuminate\Routing\Middleware\SubstituteBindings::class,
    ],

    'api' => [
        \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
        'throttle:api',
        \Illuminate\Routing\Middleware\SubstituteBindings::class,
    ],
];

/**
 * The application's route middleware.
 *
 * These middleware may be assigned to groups or used individually.
 *
 * @var array<string, class-string|string>
 */
protected $routeMiddleware = [
    'auth' => \App\Http\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
    'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
    'can' => \Illuminate\Auth\Middleware\Authorize::class,
    'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
    'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
    'signed' => \App\Http\Middleware\ValidateSignature::class,
    'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
    'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
    'dynamicDB' => DynamicDB::class,
];

}

from log-viewer.

Merite15 avatar Merite15 commented on August 25, 2024

I doesn't have a log-viewer file in config directory

from log-viewer.

arukompas avatar arukompas commented on August 25, 2024

Hey @Merite15 , I can't reproduce the issue.

Your Http/Kernel setup is standard, and I've copied your configuration to a fresh new Laravel 9 project and it works as expected, the Log Viewer loads in the browser and all actions work:

Screenshot 2023-01-13 at 08 29 24

Can you share the screenshot of the error you're receiving? And explain the steps you took before the error?

from log-viewer.

Merite15 avatar Merite15 commented on August 25, 2024

My computer is a macbook and i install package after this i call localhost:8000/log-viewer for log preview and i have an 419 error in http://localhost:8000/livewire/message/log-viewer::log-list
anydesk00000

from log-viewer.

arukompas avatar arukompas commented on August 25, 2024

Hey @Merite15 , are cookies disabled in the browser?

Cookies are required to keep a session active and this to keep the Log Viewer working properly.

I don't see any "Cookie" or "Set-Cookie" header in the response, that's why I'm asking. This would also explain why this is happening.

from log-viewer.

arukompas avatar arukompas commented on August 25, 2024

Hey all, I've just released v2 of the Log Viewer without the Livewire dependency. It should now work a lot better and in more environments.

Read more about the v2 release and how to upgrade here - https://arunas.dev/log-viewer-v2/

Closing this for now. If you still have issues with v2, please open a new issue. Thanks! 😀

from log-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.