SvelteKit:禁用来自同一主机的某些 <a> link 的内部 link 路由
SvelteKit: Disable internal link routing for certain <a> links served from the same host
我在 Svelte 组件中有一个 link。此 link 的目的地由保留代理服务器处理,因此 link 目的地不是 Svelte 应用程序的一部分,即使它与 Svelte 应用程序共享相同的 URL 路径。
如果我单击 link,Svelte 会尝试使用其内部路由器解析 link。如何强制 Web 浏览器加载 Svelte 中的 link 并由内部路由器跳过?
我的link代码是:
<!-- /docs/ is served from the reverse proxy by the web server and not part of Svelte -->
<a href="https://tradingstrategy.ai/docs/index.html">Documentation</a>
您可以告诉 SvelteKit 跳过处理 link 并使用具有 rel="external"
属性的正常浏览器导航。
此属性记录在此处:https://kit.svelte.dev/docs#anchor-options-rel-external
<a rel="external" href="https://tradingstrategy.ai/docs/index.html">Documentation</a>
我在 Svelte 组件中有一个 link。此 link 的目的地由保留代理服务器处理,因此 link 目的地不是 Svelte 应用程序的一部分,即使它与 Svelte 应用程序共享相同的 URL 路径。
如果我单击 link,Svelte 会尝试使用其内部路由器解析 link。如何强制 Web 浏览器加载 Svelte 中的 link 并由内部路由器跳过?
我的link代码是:
<!-- /docs/ is served from the reverse proxy by the web server and not part of Svelte -->
<a href="https://tradingstrategy.ai/docs/index.html">Documentation</a>
您可以告诉 SvelteKit 跳过处理 link 并使用具有 rel="external"
属性的正常浏览器导航。
此属性记录在此处:https://kit.svelte.dev/docs#anchor-options-rel-external
<a rel="external" href="https://tradingstrategy.ai/docs/index.html">Documentation</a>