-
-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: provide two different Url constructors: with and without base
The URL constructor without base (`Url::try_from`) requires an absolute URL, so we need to enforce this for all callers. The only caller which called this with a relative path was `create_location()`, so I changed `create_location` to always prepend `http://leptos.dev` to the path. The origin in this case doesn't matter, because `create_location()` doesn't use the origin. However, there was an inconsistency between client and server: previosly, `create_location()` was called with a relative path on the client and an absolute URL (with origin `http://leptos.rs` or `http://leptos.dev`) on the server. I fixed this by always using a relative path on the server, too.
- Loading branch information
Showing
5 changed files
with
105 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters