Closed danrot closed 4 years ago
Hi @danrot,
I'm sorry for the inconvenience, I would think it would be solved if not the base_url
would be set to window.location.host
as fallback but the host
should be set to window.location.host
. What do you think?
I may have overlooked this when merging #371.
I will revert #371 and release a new version to mitigate the issue for now, and have a closer look later on.
Regards, Tobias
Thank you for quickly handling this! And I don't know the codebase too well, if I am completely honest... So I don't really know where this default should actually go without breaking something :see_no_evil:
And by the way, there is the wrong commit referenced for 2.5.3 on packagist: https://packagist.org/packages/friendsofsymfony/jsrouting-bundle#v2.5.3
Oh, and I don't know how that will affect this feature, but you should also consider the port when implementing it again :slightly_smiling_face:
And by the way, there is the wrong commit referenced for 2.5.3 on packagist
I tagged the wrong version when I was releasing 2.5.2, it has been corrected now. Thanks for the heads up. The fallback will be fixed in a new issue, I'm closing this issue.
We are using your bundle, and Version 2.5.2 breaks our application, because the URL is generated with the current host, but without the scheme. This results in a relative URL without a starting slash (e.g.
example.org/test
), and then the gets appended to the current URL, resulting in something likeexample.org/test/example.org/test
, which is not a valid URL in our case.We have already broken it down to the usage of
window.location.host
to set thebase_url
, and then generating the URL without the the scheme.