Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar doesn't work with browsersync #51

Open
lichtner opened this issue Jan 19, 2021 · 1 comment
Open

Toolbar doesn't work with browsersync #51

lichtner opened this issue Jan 19, 2021 · 1 comment

Comments

@lichtner
Copy link

I would like to use laravel-telescope-toolbar with browserSync

Toolbar works fine with php artisan serve on http://localhost:3000

But after I enabled browserSync in webpack.mix.js:

.browserSync({
    proxy: 'http://localhost:8000',
    files: [
        'resources/views/**/*.blade.php',
    ]
});

on domain http://localhost:8000 I don't see any toolbar and in Chrome console I see this error:

Access to XMLHttpRequest at 'http://localhost:8000/_tt/render/92872b43-05f7-4ed3-807c-39f62ba9a9f8' from origin
'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.

btw. telescope works on both domains
http://localhost:8000/telescope
http://localhost:3000/telescope

I am not sure if it a bug or can you help me how can I fix it?
Thanks

@muhzak
Copy link

muhzak commented Mar 13, 2021

In your cors.php add _tt/*

    'paths' => [
            'api/*',

            '_tt/*',
    ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants