🐈

Inertiajs Link でtarget blankにしようとしたらエラー

2023/01/08に公開

エラー内容

<Link :href="route(...)" target="_blank">Link</Link>
Access to XMLHttpRequest at 'https://...' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

解決方法

今のところ、普通のaタグを使うのが解決方法みたい

参考

https://github.com/inertiajs/inertia/issues/1096

Discussion