inertia: Link component missing behavior for URLs from another origin

Version:

  • @inertiajs/vue3 version: 1.0.14

Describe the problem:

When I click on a link with a different host, a white screen is displayed and error 409 (Conflict) is written in the console. The Link component should redirect to the specified page if it receives a 409 conflict error.

Solution:

use location.href = linkComponentHref whenever it gets 409 error. This must be implemented inside Link component because all developers expect this component behave like this.

Steps to reproduce:

App.vue:

<script setup>
import {Link} from '@inertiajs/vue3';
</script>

<template>
   <p>Hi this is my website at example.com</p>
   <p>click on following link to see a random page from my website or another website which i don't own</p>
   <Link href="https://google.com">Click here to see Google website</Link>
</template>

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments