fix(analytics): fix OpenPanel script rewrite URL
Some checks failed
Build and Deploy / build (push) Has been cancelled
Some checks failed
Build and Deploy / build (push) Has been cancelled
This commit is contained in:
@@ -8,6 +8,7 @@ const nextConfig: NextConfig = {
|
|||||||
async rewrites() {
|
async rewrites() {
|
||||||
const rybbitHost = process.env.NEXT_PUBLIC_RYBBIT_HOST || "https://rybbit.nodecrew.me";
|
const rybbitHost = process.env.NEXT_PUBLIC_RYBBIT_HOST || "https://rybbit.nodecrew.me";
|
||||||
const openpanelUrl = process.env.OPENPANEL_API_URL || "https://op.nodecrew.me/api";
|
const openpanelUrl = process.env.OPENPANEL_API_URL || "https://op.nodecrew.me/api";
|
||||||
|
const openpanelScriptUrl = "https://op.nodecrew.me";
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: "/api/script.js",
|
source: "/api/script.js",
|
||||||
@@ -35,7 +36,7 @@ const nextConfig: NextConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: "/api/op/op1.js",
|
source: "/api/op/op1.js",
|
||||||
destination: `${openpanelUrl}/op1.js`,
|
destination: `${openpanelScriptUrl}/op1.js`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user