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

Asset URLs Contain Incorrect Port in Laravel Sail Environment with Expose Reverse Proxy #388

Closed
erictourigny23 opened this issue Jul 31, 2023 · 1 comment

Comments

@erictourigny23
Copy link

Description:
I am experiencing an issue with asset URLs in my Laravel Sail application when accessed through the Expose reverse proxy service. My application is set up to use Laravel Sail's built-in PHP development server, which runs on port 9090. However, when I access the application through Expose using the URL "eric-tourigny.us-1.sharedwithexpose.com," the asset URLs contain ":8080" in them, which causes assets to fail loading.

Expected Behavior:
Asset URLs should not contain any port information and should correctly resolve to "eric-tourigny.us-1.sharedwithexpose.com."

Steps to Reproduce:
1- Set up a Laravel Sail environment with the PHP development server running on port 9090.
2- Configure Expose to forward requests to the Laravel Sail application.
3- Access the application through the Expose URL "eric-tourigny.us-1.sharedwithexpose.com."
4- Inspect the asset URLs in the rendered HTML.

Actual Result:
Asset URLs contain ":8080," leading to asset loading issues.

Please let me know if there are any further details or logs needed to investigate this issue. Any assistance or guidance on resolving this problem would be greatly appreciated. Thank you.

@sschlein
Copy link
Member

Sorry for the late reply but this doesn't seem like an Expose problem. Expose itself only shares the url that you share with it and does not change local paths. When using Expose, I recommend running a build version of your assets and not a development server.

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