Skip to content

Commit 43665a8

Browse files
authored
fix: Minikit template prepends process.env.VERCEL_URL with https:// (#2502)
1 parent 0c0d957 commit 43665a8

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

examples/minikit-example/minikit.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
const ROOT_URL = process.env.NEXT_PUBLIC_URL || process.env.VERCEL_URL;
1+
const ROOT_URL =
2+
process.env.NEXT_PUBLIC_URL ||
3+
(process.env.VERCEL_URL && `https://${process.env.VERCEL_URL}`) ||
4+
"http://localhost:3000";
25

36
/**
4-
* MiniApp configuration object. Must follow the Farcaster MiniApp specification.
7+
* MiniApp configuration object. Must follow the mini app manifest specification.
58
*
6-
* @see {@link https://miniapps.farcaster.xyz/docs/guides/publishing}
9+
* @see {@link https://docs.base.org/mini-apps/features/manifest}
710
*/
811
export const minikitConfig = {
912
accountAssociation: {
@@ -26,7 +29,7 @@ export const minikitConfig = {
2629
homeUrl: ROOT_URL,
2730
webhookUrl: `${ROOT_URL}/api/webhook`,
2831
primaryCategory: "utility",
29-
tags: [],
32+
tags: ["example"],
3033
heroImageUrl: `${ROOT_URL}/hero.png`,
3134
tagline: "",
3235
ogTitle: "",

templates/minikit-nextjs/minikit.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
const ROOT_URL = process.env.NEXT_PUBLIC_URL || process.env.VERCEL_URL;
1+
const ROOT_URL =
2+
process.env.NEXT_PUBLIC_URL ||
3+
(process.env.VERCEL_URL && `https://${process.env.VERCEL_URL}`) ||
4+
"http://localhost:3000";
25

36
/**
4-
* MiniApp configuration object. Must follow the Farcaster MiniApp specification.
7+
* MiniApp configuration object. Must follow the mini app manifest specification.
58
*
6-
* @see {@link https://miniapps.farcaster.xyz/docs/guides/publishing}
9+
* @see {@link https://docs.base.org/mini-apps/features/manifest}
710
*/
811
export const minikitConfig = {
912
accountAssociation: {
@@ -23,7 +26,7 @@ export const minikitConfig = {
2326
homeUrl: ROOT_URL,
2427
webhookUrl: `${ROOT_URL}/api/webhook`,
2528
primaryCategory: "utility",
26-
tags: [],
29+
tags: ["example"],
2730
heroImageUrl: `${ROOT_URL}/hero.png`,
2831
tagline: "",
2932
ogTitle: "",

0 commit comments

Comments
 (0)