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

Update versioning in middleware #658

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

RobertBoes
Copy link
Contributor

The first check that's done in the default version method of the middleware is to check if app.asset_url exists. This was added to support Laravel Vapor, see the comment in the original commit by @claudiodekker: b1a4af2

This can however introduce unintended behaviour. For example if you have your assets located on a CDN it would just be a static URL. This causes the version hash to not update, so deploying a new version of your app would cause issues as clients would try to fetch non-existing assets and Inertia not forcing a refresh on the client.

A simple fix is instead of just checking if the config value exists we'd check if the app is running within Vapor (see laravel/vapor-core#164)

@nsanden
Copy link

nsanden commented Sep 7, 2024

+1

Happened to me. Version was never changing due to ASSET_URL being set, so navigation would break each time I would build. Wreaked havoc!

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

Successfully merging this pull request may close these issues.

2 participants