Skip to content

'base' does not work with absolute URL #2927

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

Closed
njam opened this issue Sep 13, 2019 · 2 comments
Closed

'base' does not work with absolute URL #2927

njam opened this issue Sep 13, 2019 · 2 comments

Comments

@njam
Copy link

njam commented Sep 13, 2019

Version

3.1.3

Reproduction link

https://repl.it/@njam/vue-router-base

Steps to reproduce

  1. Set 'base' to an absolute URL
  2. Resolve any link

What is expected?

Final URL is based on absolute base URL:
"http://example.com/foo"

What is actually happening?

Final URL is using base URL as relative path:
"/http:/example.com/"


I couldn't find a ticket for this, only a closed PR: #1353

@posva
Copy link
Member

posva commented Sep 13, 2019

This is expected, the router expects only the URI part, without the domain. It does strip it when provided through the base element but not otherwise since the domain is out of router's reach so it would be confusing the specify a full url in the js, people may end up specifying different domains depending on the build when at the end, the URI is enough

@posva posva closed this as completed Sep 13, 2019
@njam
Copy link
Author

njam commented Sep 13, 2019

Ok thanks for clarifying!

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