Laravel Sail Share and URLs #36942
Unanswered
liamoreilly
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
When using
sail share
the web pages do not function correctly as the generated URLs for assets do not use the exposed hostname.As an example, let's consider a run of
sail share
. This produces the output on the terminal:Navigating to http://ykn4nriozw.laravel-sail.site:8080 does yield the website, but with no Javascript nor CSS. An inspection of the page source shows the problem:
The URLs for CSS and Javascript are produced using the Local-URL which is not accessible for those accessing the site with the Expose-URL.
I would imagine the correct behaviour would be that the generated URLs should be
That is, they are built with the Expose-URL.
Is there a flag or setting that enables this behaviour?
It seems the ability to share is more or less not functional with local assets. Anyone viewing the site with the Expose-URL only gets the HTML (and no assets).
The problem is actually a little worse, as all URLs are affected including those used anchor tags. Thus, page navigation also does not function.
Any ideas, hints, or tips are welcome.
Thanks,
Liam
Beta Was this translation helpful? Give feedback.
All reactions