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

nginx rule for Laravel livewire in Laravel template #96

Closed
afraazali opened this issue Oct 8, 2024 · 2 comments
Closed

nginx rule for Laravel livewire in Laravel template #96

afraazali opened this issue Oct 8, 2024 · 2 comments

Comments

@afraazali
Copy link

When using Laravel Livewire, there's a script that's added, which uses the route: /livewire.js. The current nginx configuration tries to serve this as a static asset, due to the NGINX_STATIC_EXT_REGEX variable.

The current workaround is to simply remove js from the NGINX_STATIC_EXT_REGEX variable. Another work around is to create your own preset.

Would it be possible to add the follow location directive to the laravel preset:

location = /livewire/livewire.js {
    expires off;
    try_files $uri $uri/ /index.php?$query_string;
}
@csandanov csandanov reopened this Oct 9, 2024
@csandanov
Copy link
Member

Added, could you please test once the built completed. If everything is ok I will release a tag

@afraazali
Copy link
Author

Thank you @csandanov. I confirmed this is working for me. I appreciate the quick turnaround!

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