有没有办法从已安装的商店获取代理网址

问题描述 投票:0回答:1

当您在 Shopify 中使用应用代理设置表单时,您需要告诉表单将数据发送到哪里(操作 URL)。例如:

import { redirect } from "@remix-run/node";
import { authenticate } from "~/shopify.server";

export async function loader({ request }) {
  const { liquid } = await authenticate.public.appProxy(request);

  return liquid(
    <form method="post" action="/apps/proxy/my-action">
      <input type="text" name="field" />
      <button type="submit">Submit</button>
    </form>
  );
}

但问题是商家可以更改应用程序代理所在的路径。如果他们这样做,表单的操作 URL 将中断,因为它指向旧路径。

我期待我们是否可以从已安装的商店获取代理网址

shopify shopify-app shopify-api remix.run
1个回答
0
投票

是的,您绝对可以找到已安装应用程序的代理 URL。为此:

  1. 在 Shopify 后台打开已安装的应用程序。
  2. 单击“管理应用程序”(位于屏幕右上角)。

enter image description here

  1. 在“应用程序代理”部分下,您将看到代理 URL 详细信息。

enter image description here

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.