Add proxy_path
config for subfolder usage in Horizon's Vue front-end
#1538
+5
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds a new config key
proxy_path
to Laravel Horizon, allowing developers to serve Horizon behind a reverse proxy in a subfolder (e.g.example.com/some-prefix/horizon
) without impacting existing setups that rely on the defaultpath
. This new config ensures that Horizon’s Vue front-end correctly references the subfolder path for API calls and other resources.Key Changes:
proxy_path
configuration toconfig/horizon.php
.proxy_path
so subfolder routing works properly behind a proxy.path
configuration untouched ifproxy_path
is empty.With this change, anyone who needs a subfolder URL behind a proxy (e.g.
example.com/laravel/horizon
) can specifyproxy_path
accordingly, avoiding the need for additional rewrites or patchwork solutions—all while preserving the default Horizon behavior for other installations.