question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Favour no prefix default route when using prefix_and_default_strategy

See original GitHub issue

I am using the prefix_and_default strategy. Let’s say my default locale is en. I would like to favour www.foo.com/blog rather than www.foo.com/en/blog.

It seems that the routes with prefix are favoured. How can favour the other way ?

I am in PWA mode and using yarn dev.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
rchlcommented, May 25, 2020

That’s correct.

But it’s still a bug that resolving by path doesn’t select the most optimal option and that will be fixed.

1reaction
rchlcommented, May 25, 2020

Right, I can see the problem now.

BTW. Your test is ambiguous as the outcome of the test depends on the currently selected locale and we can’t see or change that. Here is a better test: https://codesandbox.io/s/stoic-cache-li0bt?file=/pages/index.vue . Or you could explicitly ask for fr locale in localePath.

Also, the bug wouldn’t trigger if you would pass the route name (about) rather than the path (/about). Route names are always better options, if possible.

But it’s a bug nonetheless.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Favour no prefix default route when using ... - GitHub
I am using the prefix_and_default strategy. Let's say my default locale is en. I would like to favour www.foo.com/blog rather than ...
Read more >
How to configure BGP to accept only default routes using ...
To resolve this issue, create a prefix list to permit only default routes and use this list to filter routes learned from BGP...
Read more >
BGP preferred outbound peer for given prefix when none of ...
To manipulate my out-bound routes I'm using route-maps that set the an equal local-preference for outbound traffic towards received prefixes so ...
Read more >
Configuration Element Reference | SSN Docs
Configuring IP prefixes within an access-policy on a network-interface with no tenant assigned presumes that the prefix falls within the ...
Read more >
HTTP route components (proto) - Envoy Proxy
(DEFAULT) ⁣No TLS requirement for the virtual host. EXTERNAL_ONLY ... (string) The human readable prefix to use when emitting statistics for this endpoint....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found