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

Assets/links being loaded from the "local" URL #19

Closed
xewl opened this issue Jun 17, 2020 · 3 comments
Closed

Assets/links being loaded from the "local" URL #19

xewl opened this issue Jun 17, 2020 · 3 comments

Comments

@xewl
Copy link

xewl commented Jun 17, 2020

While exposing my local site, the local URL's are still being loaded from the local domain.

Eg.

$ expose share somelocal.site --subdomain=somelocalsite
[...]
Local-URL:              somelocal.site
Dashboard-URL:          http://127.0.0.1:4040
Expose-URL:             https://somelocalsite.sharedwithexpose.com

Shows the local site, but "somelocal.site" instances in source aren't rewritten to the Expose URL.

Though, I might have missed something in the docs.

@mpociot
Copy link
Member

mpociot commented Jun 17, 2020

Depending on how you load your assets, this could be an issue with your trusted proxy settings in your Laravel application.

@xewl
Copy link
Author

xewl commented Jun 17, 2020

Had to change APP_URL \ ASSET_URL to the expose URL & clear route caching.
But, yeah.. changing that over all the time when I need to expose, feels a bit weird.
Proxy was default (config wasn't published), seems unrelated.

@mpociot mpociot closed this as completed Jun 17, 2020
@sebdesign
Copy link
Contributor

I had a similar issue with a laravel application on Valet. The local site is example.test and I'm loading the assets from assets.example.test, which is also linked on Valet.

E.g.:

expose share example.test --subdomain=example

When I'm loading https://example.sharedwithexpose.com none of the assets are loading due to mixed content, because Symfony doesn't think the request to this domain is secure (Request::isSecure() returns false). I believe that https://example.sharedwithexpose.com exposes http://example.test and not https://example.test, so the HTTPS server variable is not set.

Specifying the https scheme in the host argument does fix this:

expose share https://example.test --subdomain=example

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

3 participants